* cfgcleanup.c (try_optimize_cfg): Fix thinko in previous patch.
authorJan Hubicka <jh@suse.cz>
Mon, 10 Mar 2003 18:32:17 +0000 (19:32 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Mon, 10 Mar 2003 18:32:17 +0000 (18:32 +0000)
From-SVN: r64103

gcc/ChangeLog
gcc/cfgcleanup.c

index 8ac10a2b98611d6aef2611eca9eb0a07adf6b013..0dbb59141e44fca69774585e79051144c6b72652 100644 (file)
@@ -44,6 +44,8 @@
 
 Mon Mar 10 15:30:36 CET 2003  Jan Hubicka  <jh@suse.cz>
 
+       * cfgcleanup.c (try_optimize_cfg): Fix thinko in previous patch.
+
        * cfgcleanup.c (merge_blocks): Return where to iterate next.
        (try_optimize_cfg): Use return value of merge_blocks
 
index 6ccc3eeca3e94ac900958b0a5625f07207d83ed0..7ed5c3d30606e080d96f9a41aafcb37a3db7b1fc 100644 (file)
@@ -861,6 +861,8 @@ merge_blocks (e, b, c, mode)
       b_has_incoming_fallthru = (tmp_edge != NULL);
       b_fallthru_edge = tmp_edge;
       next = b->prev_bb;
+      if (next == c)
+       next = next->prev_bb;
 
       /* Otherwise, we're going to try to move C after B.  If C does
         not have an outgoing fallthru, then it can be moved