(Re)allocation of allocatable arrays on assignment - F2003
Dominique Dhumieres
dominiq@lps.ens.fr
Mon Nov 1 10:31:00 GMT 2010
Paul,
I think I have found another problem with bounds:
[macbook] f90/bug% cat bounds_sec_a_8_red.f90
integer, parameter :: ik=8
integer(4), allocatable :: ib(:)
integer, parameter :: from=-1, to=2
integer(ik), allocatable :: ia(:)
allocate(ia(from:to))
ib=ia
print *, 'bounds, full array ', lbound(ib), ubound(ib)
deallocate(ia)
end
[macbook] f90/bug% gfc bounds_sec_a_8_red.f90
[macbook] f90/bug% a.out
bounds, full array 1 4
Should not the answer be -1:2?
Dominique
More information about the Gcc-patches
mailing list