(Re)allocation of allocatable arrays on assignment - F2003
Paul Richard Thomas
paul.richard.thomas@gmail.com
Tue Nov 2 21:35:00 GMT 2010
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
More information about the Gcc-patches
mailing list