aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfgcleanup.c
diff options
context:
space:
mode:
authorBernd Schmidt <bernds@codesourcery.com>2010-09-24 11:29:59 +0000
committerBernd Schmidt <bernds@gcc.gnu.org>2010-09-24 11:29:59 +0000
commit662592e1bac8b26f51e4b3c3e694b7d909487d3b (patch)
treeab51341f3caa8c5b0917e78b80af5fd993c1f920 /gcc/cfgcleanup.c
parente2686b2d7618aefeeb4b62c4d0731ca24c17c1e6 (diff)
downloadgcc-662592e1bac8b26f51e4b3c3e694b7d909487d3b.zip
gcc-662592e1bac8b26f51e4b3c3e694b7d909487d3b.tar.gz
gcc-662592e1bac8b26f51e4b3c3e694b7d909487d3b.tar.bz2
cfgcleanup.c (flow_find_head_matching_sequence): Terminate when reaching the end of a block if it occurs at a DEBUG_INSN.
* cfgcleanup.c (flow_find_head_matching_sequence): Terminate when reaching the end of a block if it occurs at a DEBUG_INSN. From-SVN: r164589
Diffstat (limited to 'gcc/cfgcleanup.c')
-rw-r--r--gcc/cfgcleanup.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c
index 6b128eb..9f3e68e 100644
--- a/gcc/cfgcleanup.c
+++ b/gcc/cfgcleanup.c
@@ -1184,7 +1184,6 @@ flow_find_head_matching_sequence (basic_block bb1, basic_block bb2, rtx *f1,
while (true)
{
-
/* Ignore notes. */
while (!NONDEBUG_INSN_P (i1) && i1 != BB_END (bb1))
i1 = NEXT_INSN (i1);
@@ -1192,6 +1191,10 @@ flow_find_head_matching_sequence (basic_block bb1, basic_block bb2, rtx *f1,
while (!NONDEBUG_INSN_P (i2) && i2 != BB_END (bb2))
i2 = NEXT_INSN (i2);
+ if ((i1 == BB_END (bb1) && !NONDEBUG_INSN_P (i1))
+ || (i2 == BB_END (bb2) && !NONDEBUG_INSN_P (i2)))
+ break;
+
if (NOTE_P (i1) || NOTE_P (i2)
|| JUMP_P (i1) || JUMP_P (i2))
break;