------- Comment #2 from kargl at gcc dot gnu dot org  2010-04-15 16:10 -------
(In reply to comment #1)
> Shorter test:
> 
>    real :: a(1,1), b(3)
>    integer :: i
>    b = 45.0
>    i = 2
>    a(1,1:i) = b(i)
> end

Gfortran seems to do the right thing on this test case.

laptop:kargl[212] gfc4x -o z -fcheck=all a.f90 -fdump-tree-original
laptop:kargl[213] ./z
At line 5 of file a.f90
Fortran runtime error: Index '2' of dimension 2 of array 'a' outside
of expected range (1:1)

The original testcase in comment #1 still contains the variable.


-- 


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

Reply via email to