diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e767db3d2ca8..0cb33a0a0469 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2010-09-27 Hans-Peter Nilsson + + * 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 Bernd Schmidt diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 35a4360c973a..16032e94044b 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -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);