[Bug fortran/56816] ICE in delete_root
mikael at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Apr 3 20:34:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56816
--- Comment #7 from Mikael Morin <mikael at gcc dot gnu.org> 2013-04-03 20:33:59 UTC ---
The following tentative patch uses the recent multiple change set facility.
It is not sufficient though. It triggers an assertion in
enforce_single_undo_checkpoint, called from gfc_commit_symbol which doesn't
support multiple change sets.
Index: match.c
===================================================================
--- match.c (révision 196417)
+++ match.c (copie de travail)
@@ -5365,6 +5365,7 @@ gfc_match_select_type (void)
bool class_array;
gfc_symbol *sym;
gfc_namespace *parent_ns;
+ gfc_undo_change_set chg_syms;
m = gfc_match_label ();
if (m == MATCH_ERROR)
@@ -5375,6 +5376,7 @@ gfc_match_select_type (void)
return m;
gfc_current_ns = gfc_build_block_ns (gfc_current_ns);
+ gfc_new_undo_checkpoint (chg_syms);
m = gfc_match (" %n => %e", name, &expr2);
if (m == MATCH_YES)
@@ -5441,9 +5443,11 @@ gfc_match_select_type (void)
select_type_push (expr1->symtree->n.sym);
+ gfc_drop_last_undo_checkpoint ();
return MATCH_YES;
cleanup:
+ gfc_restore_last_undo_checkpoint ();
parent_ns = gfc_current_ns->parent;
gfc_free_namespace (gfc_current_ns);
gfc_current_ns = parent_ns;
More information about the Gcc-bugs
mailing list