From: Bernd Schmidt Date: Fri, 27 Jan 2017 19:40:44 +0000 (-0700) Subject: re PR rtl-optimization/79194 (ICE in rtl_verify_bb_insns, at cfgrtl.c:2661 (error... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=711ce021292b9aab917ec09e4bea39a35d78f67a;p=gcc.git re PR rtl-optimization/79194 (ICE in rtl_verify_bb_insns, at cfgrtl.c:2661 (error: flow control insn inside a basic block)) 2017-01-27 Bernd Schmidt PR rtl-optimization/79194 * cprop.c (one_cprop_pass): Move deletion of code after unconditional traps before call to bypass_conditional_jumps. PR rtl-optimization/79194 * gcc.dg/torture/pr79194.c: New test. From-SVN: r244993 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4de9c0245be..39e6c1fb86d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-01-27 Bernd Schmidt + + PR rtl-optimization/79194 + * cprop.c (one_cprop_pass): Move deletion of code after unconditional + traps before call to bypass_conditional_jumps. + 2017-01-27 Vladimir Makarov PR tree-optimization/71374 diff --git a/gcc/cprop.c b/gcc/cprop.c index ae2f19d6f72..f704a0d1f5e 100644 --- a/gcc/cprop.c +++ b/gcc/cprop.c @@ -1863,8 +1863,6 @@ one_cprop_pass (void) } } - changed |= bypass_conditional_jumps (); - while (!uncond_traps.is_empty ()) { rtx_insn *insn = uncond_traps.pop (); @@ -1873,6 +1871,8 @@ one_cprop_pass (void) emit_barrier_after_bb (to_split); } + changed |= bypass_conditional_jumps (); + FREE_REG_SET (reg_set_bitmap); free_cprop_mem (); } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f2d9dfb7274..eb63091bbda 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-01-27 Bernd Schmidt + + PR rtl-optimization/79194 + * gcc.dg/torture/pr79194.c: New test. + 2017-01-27 Vladimir Makarov PR tree-optimization/71374 diff --git a/gcc/testsuite/gcc.dg/torture/pr79194.c b/gcc/testsuite/gcc.dg/torture/pr79194.c new file mode 100644 index 00000000000..e7df6902291 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr79194.c @@ -0,0 +1,42 @@ +/* { dg-do compile } */ + +int iw, vr; + +void +d9 (unsigned int j3, long long int f5, int kp) +{ + int *qb = &kp; + + if (kp != 0) + { + long long int oq; + unsigned int tl = 0; + + for (j3 = 0; j3 < 1; ++j3) + qb = &tl; + goto ed; + + l7: + oq = 1; + while (oq < 2) + oq *= j3; + + ed: + do + { + oq -= *qb; + if (oq != 0) + { + long long int ie = j3 & f5; + int ws = (j3 != 0 && kp != 0); + + tl = ie > ws; + iw = vr = tl; + } + else + tl = (kp != 0 && (0 % 0) != 0); /* { dg-warning "division by zero" } */ + } + while (tl != 0); + } + goto l7; +}