Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Assigning a zero sized array to allocatable

26 views
Skip to first unread message

\"Vladimír Fuka <"name.surnameat

unread,
Feb 4, 2013, 6:13:24 AM2/4/13
to

Hello, what is the correct result of assigning a zero sized array to an
allocatable array? When F2003 reallocation is enabled, gfortran 4.7.1
deallocates the array, whereas Intel Fortran 13 leaves the array as
allocated to zero size.

Vladimir


--
Tato zpráva byla vytvořena převratným poštovním klientem Opery:
http://www.opera.com/mail/

Ian Harvey

unread,
Feb 4, 2013, 2:43:42 PM2/4/13
to
On 2013-02-04 10:13 PM, \"Vladimír Fuka <\"name.surname at >> wrote:
>
> Hello, what is the correct result of assigning a zero sized array to an
> allocatable array? When F2003 reallocation is enabled, gfortran 4.7.1
> deallocates the array, whereas Intel Fortran 13 leaves the array as
> allocated to zero size.
>
> Vladimir

The variable on the left hand side of the assignment should come out
allocated to zero size, lower bound of one, same dynamic type and
deferred parameters of the right hand side expression.

Ian Harvey

unread,
Feb 4, 2013, 2:44:55 PM2/4/13
to
(Well, add five years for the dynamic type bit.)
0 new messages