[Bug fortran/57306] [OOP] [F08] ICE on valid with class pointer initialization

burnus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Aug 1 21:32:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57306

--- Comment #10 from Tobias Burnus <burnus at gcc dot gnu.org> ---
> Putting this inside a subroutine, one gets:
> 
>   class(c), pointer :: px => x
>                               1
> Error: Pointer initialization target at (1) must have the SAVE attribute

That sounds like a bug:

"Explicit initialization of a variable that is not in a common block implies
the SAVE attribute, which may be confirmed by explicit specification." (5.2.3
Initialization, F2008)

And "px" is clearly initialized - see R505 and "The appearance of
initialization in an entity-decl for an entity without the PARAMETER attribute
speci
es that
the entity is a variable with explicit initialization."


More information about the Gcc-bugs mailing list