This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: (Re)allocation of allocatable arrays on assignment - F2003
- From: dominiq at lps dot ens dot fr (Dominique Dhumieres)
- To: paul dot richard dot thomas at gmail dot com, dominiq at lps dot ens dot fr
- Cc: gcc-patches at gcc dot gnu dot org, fortran at gcc dot gnu dot org, burnus at net-b dot de
- Date: Mon, 01 Nov 2010 11:18:24 +0100
- Subject: Re: (Re)allocation of allocatable arrays on assignment - F2003
- References: <20101009134002.157E83BE0F@mailhost.lps.ens.fr> <AANLkTinUrNM2PSQdAoCb=PGEhNtyvx5-Czke8hKcCbJb@mail.gmail.com> <20101023202653.2DF9D3BE18@mailhost.lps.ens.fr> <AANLkTimcyDC-qh43tOCkaWwfsT2_RsW3MfZ3ChQRj3zp@mail.gmail.com> <4CC47A12.7050504@net-b.de> <AANLkTi=mxWu9dUeBrvgGeVeTMuB4DD=pEJnnsKxVMaKZ@mail.gmail.com> <20101031215043.8B69A3BE18@mailhost.lps.ens.fr> <AANLkTim-ZGfmRmkbbq4rh9i_QwVxp3VJkQx9oJkWe6OQ@mail.gmail.com>
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