(Re)allocation of allocatable arrays on assignment - F2003
Paul Richard Thomas
paul.richard.thomas@gmail.com
Tue Nov 2 21:26:00 GMT 2010
Dominique,
I think that you are right but Intel gives the same result - ***sigh**
I have put that on the list to investigate. The more fundamental
issues are now resolved; eg bounds changing with same size and
function result assignments.
Thanks for your continuing support on this.
Paul
On Mon, Nov 1, 2010 at 11:18 AM, Dominique Dhumieres <dominiq@lps.ens.fr> wrote:
> 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
>
--
The knack of flying is learning how to throw yourself at the ground and miss.
--Hitchhikers Guide to the Galaxy
More information about the Fortran
mailing list