[Bug fortran/50392] SIGSEGV in gfc_trans_label_assign
burnus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Sep 14 16:16:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50392
--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-09-14 16:08:16 UTC ---
Patch:
--- a/gcc/fortran/trans-decl.c
+++ b/gcc/fortran/trans-decl.c
@@ -1264,9 +1265,7 @@ gfc_get_symbol_decl (gfc_symbol * sym)
TREE_USED (sym->backend_decl) = 1;
if (sym->attr.assign && GFC_DECL_ASSIGN (sym->backend_decl) == 0)
- {
- gfc_add_assign_aux_vars (sym);
- }
+ gfc_add_assign_aux_vars (sym);
if (sym->attr.dimension
&& DECL_LANG_SPECIFIC (sym->backend_decl)
@@ -1277,6 +1276,10 @@ gfc_get_symbol_decl (gfc_symbol * sym)
return sym->backend_decl;
}
+ if (sym->result == sym && sym->attr.assign
+ && GFC_DECL_ASSIGN (sym->backend_decl) == 0)
+ gfc_add_assign_aux_vars (sym);
+
if (sym->backend_decl)
return sym->backend_decl;
More information about the Gcc-bugs
mailing list