aboutsummaryrefslogtreecommitdiff
path: root/gcc/emit-rtl.c
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2010-09-27 19:56:32 +0000
committerHans-Peter Nilsson <hp@gcc.gnu.org>2010-09-27 19:56:32 +0000
commit4f8344ebbd28230f55822c1e9402cc73f2d6f077 (patch)
tree8de904149a5b419db97fb0725543723f7628872d /gcc/emit-rtl.c
parentfdf0b018a6fefd7dffa785b5cae6644343f72912 (diff)
downloadgcc-4f8344ebbd28230f55822c1e9402cc73f2d6f077.zip
gcc-4f8344ebbd28230f55822c1e9402cc73f2d6f077.tar.gz
gcc-4f8344ebbd28230f55822c1e9402cc73f2d6f077.tar.bz2
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
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r--gcc/emit-rtl.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index 35a4360..16032e9 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);