emit-rtl.c (reorder_insns_nobb): Sanity-check that AFTER is not in the range FROM..TO, inclusive.

* emit-rtl.c (reorder_insns_nobb) [ENABLE_CHECKING]: Sanity-check
	that AFTER is not in the range FROM..TO, inclusive.

From-SVN: r164664
This commit is contained in:
Hans-Peter Nilsson 2010-09-27 19:56:32 +00:00 committed by Hans-Peter Nilsson
parent fdf0b018a6
commit 4f8344ebbd
2 changed files with 12 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2010-09-27 Hans-Peter Nilsson <hp@axis.com>
* emit-rtl.c (reorder_insns_nobb) [ENABLE_CHECKING]: Sanity-check
that AFTER is not in the range FROM..TO, inclusive.
2010-09-27 Hans-Peter Nilsson <hp@axis.com>
Bernd Schmidt <bernds@codesourcery.com>

View File

@ -3977,6 +3977,13 @@ delete_insns_since (rtx from)
void
reorder_insns_nobb (rtx from, rtx to, rtx after)
{
#ifdef ENABLE_CHECKING
rtx x;
for (x = from; x != to; x = NEXT_INSN (x))
gcc_assert (after != x);
gcc_assert (after != to);
#endif
/* Splice this bunch out of where it is now. */
if (PREV_INSN (from))
NEXT_INSN (PREV_INSN (from)) = NEXT_INSN (to);