This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/80707] [8 Regression] r247844 causes error: extra outgoing edge
- From: "bergner at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 12 May 2017 00:09:36 +0000
- Subject: [Bug middle-end/80707] [8 Regression] r247844 causes error: extra outgoing edge
- Auto-submitted: auto-generated
- References: <bug-80707-4@http.gcc.gnu.org/bugzilla/>
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--;