[Bug fortran/61275] Invalid initialization expression for ALLOCATABLE component in structure constructor at (1)
dominiq at lps dot ens.fr
gcc-bugzilla@gcc.gnu.org
Fri Mar 20 14:57:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61275
--- Comment #8 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
module A
Type T
character(LEN=:), allocatable :: S
end type
character(len=6), parameter :: str = 'string'
Type(T) :: TestObj = T(str)
end module
is rejected with
Type(T) :: TestObj = T(str)
1
Error: Invalid initialization expression for ALLOCATABLE component 's' in
structure constructor at (1)
So it seems that
> (a) an allocatable component is a reference to the intrinsic function NULL,
has to be taken in the most restrictive way.
If nobody objects, I'll close the PR as FIXED again.
More information about the Gcc-bugs
mailing list