This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/43185] [F2008] Implicit SAVE in MODULEs



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]