[Bug fortran/43185] [F2008] Implicit SAVE in MODULEs
burnus at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Feb 26 22:26:00 GMT 2010
------- Comment #2 from burnus at gcc dot gnu dot org 2010-02-26 22:26 -------
Index: resolve.c
===================================================================
--- resolve.c (Revision 157097)
+++ resolve.c (Arbeitskopie)
@@ -8938,12 +8938,11 @@
&& !sym->ns->save_all && !sym->attr.save
&& !sym->attr.pointer && !sym->attr.allocatable
&& has_default_initializer (sym->ts.u.derived))
- {
- gfc_error("Object '%s' at %L must have the SAVE attribute for "
- "default initialization of a component",
- sym->name, &sym->declared_at);
- return FAILURE;
- }
+ && (gfc_notify_std (GFC_STD_F2008, "Fortran 2008: Implied SAVE for "
+ "module variable '%s' at %L, needed due to "
+ "the default initializer", sym->name,
+ &sym->declared_at) == FAILURE)
+ return FAILURE;
if (sym->ts.type == BT_CLASS)
{
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43185
More information about the Gcc-bugs
mailing list