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/51435] [4.6/4.7 Regression] Bad association status after null() of derived type component


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

--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-12-06 10:33:57 UTC ---
Lightly tested patch:

--- a/gcc/fortran/expr.c
+++ b/gcc/fortran/expr.c
@@ -3733,17 +3733,14 @@ gfc_has_default_initializer (gfc_symbol *der)
     if (c->ts.type == BT_DERIVED)
       {
         if (!c->attr.pointer
             && gfc_has_default_initializer (c->ts.u.derived))
          return true;
       }
-    else
-      {
-        if (c->initializer)
-         return true;
-      }
+    if (c->initializer)
+      return true;

   return false;
 }

 /* Get an expression for a default initializer.  */


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