[Bug fortran/51435] [4.6/4.7 Regression] Bad association status after null() of derived type component
burnus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Dec 6 10:34:00 GMT 2011
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. */
More information about the Gcc-bugs
mailing list