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


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


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