------- Comment #5 from w6ws at earthlink dot net 2009-12-09 00:27 -------
(In reply to comment #4)
> ... it dawns on me that the crucial point is, that variables with
> initializer get the SAVE attribute which doesn't go well with the ALLOCATABLE
> components. Correct?
I am not sure why they put the restriction in. But note that one *can* use
null() in a structure constructor for the allocatable component. So the
following is legal:
type xyzzy
integer, allocatable :: x(:)
real :: y
end type
type(xyzzy) :: plugh = xyzzy (null (), 123.456)
See 7.1.7(3) in F2003 (and 7.1.12(3) in the F2008 draft.)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34402