From: Jan Hubicka Date: Mon, 10 Mar 2003 18:32:17 +0000 (+0100) Subject: * cfgcleanup.c (try_optimize_cfg): Fix thinko in previous patch. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=912b79e7e94435b40b1a8ac4091014dde3a4f7d8;p=gcc.git * cfgcleanup.c (try_optimize_cfg): Fix thinko in previous patch. From-SVN: r64103 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8ac10a2b986..0dbb59141e4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -44,6 +44,8 @@ Mon Mar 10 15:30:36 CET 2003 Jan Hubicka + * 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 diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c index 6ccc3eeca3e..7ed5c3d3060 100644 --- a/gcc/cfgcleanup.c +++ b/gcc/cfgcleanup.c @@ -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