This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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--;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]