[Bug middle-end/80707] [8 Regression] r247844 causes error: extra outgoing edge

bergner at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri May 12 00:17:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80707

--- Comment #4 from Peter Bergner <bergner at gcc dot gnu.org> ---
David and HJ, the following patch fixes the ICE Markus reported, so can you try
the following patch to see if it fixes your bootstrap issues?

Index: tree-cfg.c
===================================================================
--- tree-cfg.c  (revision 247845)
+++ tree-cfg.c  (working copy)
@@ -1684,6 +1684,10 @@ group_case_labels_stmt (gswitch *stmt)
          || (EDGE_COUNT (base_bb->succs) == 0
              && gimple_seq_unreachable_p (bb_seq (base_bb))))
        {
+         edge e;
+         if (base_bb != default_bb
+             && (e = find_edge (gimple_bb (stmt), base_bb)) != NULL)
+           remove_edge_and_dominated_blocks (e);
          gimple_switch_set_label (stmt, i, NULL_TREE);
          i++;
          new_size--;


More information about the Gcc-bugs mailing list