PR rtl-optimization/71916
* cfgrtl.c (contains_no_active_insn_p): Return false also for
bb which have a single succ fake edge.
* gcc.c-torture/compile/pr71916.c: New test.
From-SVN: r238490
+2016-07-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/71916
+ * cfgrtl.c (contains_no_active_insn_p): Return false also for
+ bb which have a single succ fake edge.
+
2016-07-19 Aldy Hernandez <aldyh@redhat.com>
PR debug/71855
{
rtx_insn *insn;
- if (bb == EXIT_BLOCK_PTR_FOR_FN (cfun) || bb == ENTRY_BLOCK_PTR_FOR_FN (cfun)
- || !single_succ_p (bb))
+ if (bb == EXIT_BLOCK_PTR_FOR_FN (cfun)
+ || bb == ENTRY_BLOCK_PTR_FOR_FN (cfun)
+ || !single_succ_p (bb)
+ || (single_succ_edge (bb)->flags & EDGE_FAKE) != 0)
return false;
for (insn = BB_HEAD (bb); insn != BB_END (bb); insn = NEXT_INSN (insn))
2016-07-19 Jakub Jelinek <jakub@redhat.com>
+ PR rtl-optimization/71916
+ * gcc.c-torture/compile/pr71916.c: New test.
+
PR middle-end/71874
* g++.dg/torture/pr71874.C: New test.
--- /dev/null
+/* PR rtl-optimization/71916 */
+
+int a, b, c, d, f, g;
+short h;
+
+short
+foo (short p1)
+{
+ return a >= 2 || p1 > 7 >> a ? p1 : p1 << a;
+}
+
+void
+bar (void)
+{
+ for (;;)
+ {
+ int i, j[3];
+ h = b >= 2 ? d : d >> b;
+ if (foo (f > h ^ c))
+ {
+ d = 0;
+ while (f <= 2)
+ {
+ char k[2];
+ for (;;)
+ k[i++] = 7;
+ }
+ }
+ else
+ for (;;)
+ g = j[2];
+ if (g)
+ for (;;)
+ ;
+ }
+}