-2014-03-13 Martin Jambor <mjambor@suse.cz>
+2014-03-14 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/60518
+ * cfghooks.c (split_block): Properly adjust all loops the
+ block was a latch of.
+
+2014-03-14 Martin Jambor <mjambor@suse.cz>
PR lto/60461
* ipa-prop.c (ipa_modify_call_arguments): Fix iteration condition
if (current_loops != NULL)
{
+ edge_iterator ei;
+ edge e;
add_bb_to_loop (new_bb, bb->loop_father);
- if (bb->loop_father->latch == bb)
- bb->loop_father->latch = new_bb;
+ /* Identify all loops bb may have been the latch of and adjust them. */
+ FOR_EACH_EDGE (e, ei, new_bb->succs)
+ if (e->dest->loop_father->latch == bb)
+ e->dest->loop_father->latch = new_bb;
}
res = make_single_succ_edge (bb, new_bb, EDGE_FALLTHRU);
-2014-03-13 Martin Jambor <mjambor@suse.cz>
+2014-03-14 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/60518
+ * g++.dg/pr60518.C: New testcase.
+
+2014-03-14 Martin Jambor <mjambor@suse.cz>
PR lto/60461
* gcc.dg/lto/pr60461_0.c: New test.
--- /dev/null
+// { dg-do compile }
+// { dg-options "-Os -fprofile-use" }
+
+int a;
+int fn1 () { return a == ',' || a == ';'; }
+
+void fn2 ()
+{
+ do
+ while (fn1 ())
+ ;
+ while (1);
+}