------- Comment #5 from burnus at gcc dot gnu dot org  2007-08-10 09:43 -------
Newly created test case. Expected:
* Extend (size) should be printed for "a = f()", as NAG f95 does

(I'm not sure that "different shape" is correct for the current a=b message;
additionally, the A should not be capitalized and the D in different should.)


 integer :: a(-4:1), b(0:4)
 b = 5
! a(-4:1) = b(0:4) ! Error: different shape for Array
!                  ! assignment at (1) on dimension 1 (6/5)
!
! gfortran: Array bound mismatch for dimension 1 of array 'f'
! NAG f95:  Rank 1 of array operand has extent 5 instead of 2
 a(i:1) = f(b)
contains
  function f(x)
    integer :: x(:),f(size(x))
    f = x
  end function
end


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31538

Reply via email to