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



janus at gcc dot gnu.org changed:



           What    |Removed                     |Added

----------------------------------------------------------------------------

           Keywords|                            |wrong-code



--- Comment #2 from janus at gcc dot gnu.org 2013-04-28 08:16:05 UTC ---

Draft patch:





Index: gcc/fortran/trans-decl.c

===================================================================

--- gcc/fortran/trans-decl.c    (revision 198358)

+++ gcc/fortran/trans-decl.c    (working copy)

@@ -1416,18 +1416,18 @@ gfc_get_symbol_decl (gfc_symbol * sym)

     }



   /* Remember this variable for allocation/cleanup.  */

-  if (sym->attr.dimension || sym->attr.allocatable || sym->attr.codimension

-      || (sym->ts.type == BT_CLASS &&

-      (CLASS_DATA (sym)->attr.dimension

-       || CLASS_DATA (sym)->attr.allocatable))

-      || (sym->ts.type == BT_DERIVED && sym->ts.u.derived->attr.alloc_comp)

-      /* This applies a derived type default initializer.  */

-      || (sym->ts.type == BT_DERIVED

-      && sym->attr.save == SAVE_NONE

-      && !sym->attr.data

-      && !sym->attr.allocatable

-      && (sym->value && !sym->ns->proc_name->attr.is_main_program)

-      && !(sym->attr.use_assoc && !intrinsic_array_parameter)))

+  if ((sym->attr.dimension || sym->attr.allocatable || sym->attr.codimension

+       || (sym->ts.type == BT_CLASS &&

+       (CLASS_DATA (sym)->attr.dimension

+        || CLASS_DATA (sym)->attr.allocatable))

+       || (sym->ts.type == BT_DERIVED && sym->ts.u.derived->attr.alloc_comp)

+       /* This applies a derived type default initializer.  */

+       || (sym->ts.type == BT_DERIVED

+       && sym->attr.save == SAVE_NONE

+       && !sym->attr.data

+       && !sym->attr.allocatable

+       && (sym->value && !sym->ns->proc_name->attr.is_main_program)))

+      && (!sym->attr.use_assoc || intrinsic_array_parameter))

     gfc_defer_symbol_init (sym);



   gfc_finish_var_decl (decl, sym);

Reply via email to