This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: (Re)allocation of allocatable arrays on assignment - F2003
- From: Paul Richard Thomas <paul dot richard dot thomas at gmail dot com>
- To: Dominique Dhumieres <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: Tue, 2 Nov 2010 22:28:28 +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>
Dominique,
This one is now fixed (in the version of the patch to come).
Thanks
Paul
On Sun, Oct 31, 2010 at 10:50 PM, Dominique Dhumieres
<dominiq@lps.ens.fr> wrote:
> Paul,
>
> The patch fixes all the problem I know, but for the bounds when
> the size has not changed:
>
> [macbook] f90/bug% cat realloc_bnd.f90
> real :: a(10)=1, b(51:60)=2
> real, allocatable :: c(:), d(:)
> c=a
> print *, lbound(c), ubound(c)
> c=b
> print *, lbound(c), ubound(c)
> d=b
> print *, lbound(d), ubound(d)
> d=a
> print *, lbound(d), ubound(d)
> if (any(lbound(d)/=1).or.any(ubound(d)/=10)) call abort()
> end
> [macbook] f90/bug% a.out
> ? ? ? ? ? 1 ? ? ? ? ?10
> ? ? ? ? ? 1 ? ? ? ? ?10
> ? ? ? ? ?51 ? ? ? ? ?60
> ? ? ? ? ?51 ? ? ? ? ?60
> Abort
>
> BTW I think the patch should not be delayed by this
> last problem.
>
> Thanks,
>
> Dominique
>
--
The knack of flying is learning how to throw yourself at the ground and miss.
? ? ?? --Hitchhikers Guide to the Galaxy