* tree-ssa-dce.c (remove_dead_stmt): Also schedule fixup if removing
an entry into an irreducible region.
* gcc.dg/torture/pr67005.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@227268
138bc75d-0d04-0410-961f-
82ee72b054a4
+2015-08-27 Marek Polacek <polacek@redhat.com>
+
+ PR middle-end/67005
+ * tree-ssa-dce.c (remove_dead_stmt): Also schedule fixup if removing
+ an entry into an irreducible region.
+
2015-08-27 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
* configure: Regenerate.
+2015-08-27 Marek Polacek <polacek@redhat.com>
+
+ PR middle-end/67005
+ * gcc.dg/torture/pr67005.c: New test.
+
2015-08-27 Alan Lawrence <alan.lawrence@arm.com>
* gcc.dg/tree-ssa/sra-15.c: New.
--- /dev/null
+/* { dg-do compile } */
+
+int a;
+void
+f (void)
+{
+ if (!a);
+ else
+ lbl:
+ a = a;
+
+ if (a)
+ a = 8;
+ goto lbl;
+}
if (e != e2)
{
cfg_altered = true;
- /* If we made a BB unconditionally exit a loop then this
- transform alters the set of BBs in the loop. Schedule
- a fixup. */
- if (loop_exit_edge_p (bb->loop_father, e))
+ /* If we made a BB unconditionally exit a loop or removed
+ an entry into an irreducible region, then this transform
+ alters the set of BBs in the loop. Schedule a fixup. */
+ if (loop_exit_edge_p (bb->loop_father, e)
+ || (e2->dest->flags & BB_IRREDUCIBLE_LOOP))
loops_state_set (LOOPS_NEED_FIXUP);
remove_edge (e2);
}