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
This commit is contained in:
Bernd Schmidt 2010-09-24 11:29:59 +00:00 committed by Bernd Schmidt
parent e2686b2d76
commit 662592e1ba
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2010-09-24 Bernd Schmidt <bernds@codesourcery.com>
* cfgcleanup.c (flow_find_head_matching_sequence): Terminate when
reaching the end of a block if it occurs at a DEBUG_INSN.
2010-09-09 Tristan Gingold <gingold@adacore.com>
PR target/44242

View File

@ -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;