This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: (Re)allocation of allocatable arrays on assignment - F2003


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]