https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88304
--- Comment #7 from Harald Anlauf <anlauf at gmx dot de> --- (In reply to kargl from comment #6) > (In reply to Harald Anlauf from comment #5) > > > > A derived type with component initialization (like t_fileinfo) should > > implicitly get the SAVE attribute, which appears to be lost here. > > Adding it explicitly removes the ICE. Thus a front-end issue? > > The F2018 standard (n2146.pdf, p. 78) says > > Explicit initialization in a type declaration statement (8.2) > overrides default initialization (see NOTE 7.32). Unlike explicit > initialization, default initialization does not imply that the object > has the SAVE attribute. > > HTH Thanks for pointing this out. And replacing type(t_fileinfo), save :: gattr ! No ICE by type(t_fileinfo) :: gattr = t_fileinfo() ! No ICE produces identical code. So I take back the possible wrong-code issue. Only the ICE remains.