[Bug fortran/107075] ICE in get, at cgraph.h:461

anlauf at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Sep 29 21:16:33 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107075

--- Comment #4 from anlauf at gcc dot gnu.org ---
(In reply to Mikael Morin from comment #3)
> (In reply to Richard Biener from comment #2)
> > 
> > But maybe 'z' shouldn't be of static storage duration ...
> 
> No, I think it shouldn't.  A should be static, and Z should not.

Well, I think the declaration

      integer, pointer :: z => a(2)

makes pointer z IMPLICIT_SAVE.  At least I couldn't find anything in the
standard that makes an exception for declarations in a BLOCK construct.

This is confirmed by Intel and Cray and by replacing 'program p'
by 'subroutine p'.  And in line with gfortran...

Error: Pointer initialization target at (1) must have the SAVE attribute


More information about the Gcc-bugs mailing list