gcc/
PR middle-end/80707
* tree-cfg.c: Remove cfg edges of unreachable case statements.
gcc/testsuite/
PR middle-end/80707
* g++.dg/pr80707.C: New test.
From-SVN: r247984
+2017-05-12 Peter Bergner <bergner@vnet.ibm.com>
+
+ PR middle-end/80707
+ * tree-cfg.c: Remove cfg edges of unreachable case statements.
+
2017-05-12 Will Schmidt <will_schmidt@vnet.ibm.com>
* config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling for
+2017-05-12 Peter Bergner <bergner@vnet.ibm.com>
+
+ PR middle-end/80707
+ * g++.dg/pr80707.C: New test.
+
2017-05-12 Will Schmidt <will_schmidt@vnet.ibm.com>
* gcc.target/powerpc/fold-vec-div-float.c: New.
--- /dev/null
+// PR middle-end/80707 ICE: extra outgoing edge causes verify_flow_info error.
+// { dg-do compile }
+// { dg-options "-O3" } */
+
+struct A {
+ int m_fn1(int &) const;
+};
+int A::m_fn1(int &p1) const {
+ int a[6];
+ int b = 0;
+ for (int i;; i++) {
+ if (a[i])
+ break;
+ b++;
+ }
+ while (b) {
+ int c;
+ switch (b) {
+ case 1:
+ c = 0;
+ break;
+ case 5:
+ c = a[0];
+ }
+ if (c)
+ p1 = 0;
+ b--;
+ }
+}
|| (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--;