(j3.2006) Fodder for another interp?
Bill Long
longb
Fri Oct 5 17:01:56 EDT 2012
On 10/5/12 3:52 PM, Van Snyder wrote:
> Consider the little program
>
> real, allocatable :: A(:)
> a = 1.0
> print *, size(a)
> end
>
Invalid. 7.2.1.3p3 says
If the variable is an unallocated allocatable array, expr shall have the
same rank.
Cheers,
Bill
> What does it print?
>
> 7.2.1.3p3 says "If a variable is or becomes an unallocated allocatable
> variable, it is then allocated with ... if the variable is an array and
> <expr> is a scalar, the same bounds as before.
>
> What bounds did A have before?
>
> Two of my compilers print "Segmentation fault". Another one prints 0.
>
--
Bill Long longb at cray.com
Fortran Technical Support & voice: 651-605-9024
Bioinformatics Software Development fax: 651-605-9142
Cray Inc./Cray Plaza, Suite 210/380 Jackson St./St. Paul, MN 55101
More information about the J3
mailing list