aboutsummaryrefslogtreecommitdiff
path: root/gcc/global.c
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>1998-10-09 13:28:55 +0000
committerJeff Law <law@gcc.gnu.org>1998-10-09 07:28:55 -0600
commit3663a3047f7ec94514d5c76483f1b7e8457934cf (patch)
tree38ebfe3efc2f94febce92b87abc221e38f62ee5c /gcc/global.c
parenta9e6be8ed0f3e8767865d51923c84d251dd462ec (diff)
downloadgcc-3663a3047f7ec94514d5c76483f1b7e8457934cf.zip
gcc-3663a3047f7ec94514d5c76483f1b7e8457934cf.tar.gz
gcc-3663a3047f7ec94514d5c76483f1b7e8457934cf.tar.bz2
global.c (build_insn_chain): Verify no real insns exist past the end of the last basic block, then exit the loop.
* global.c (build_insn_chain): Verify no real insns exist past the end of the last basic block, then exit the loop. From-SVN: r22961
Diffstat (limited to 'gcc/global.c')
-rw-r--r--gcc/global.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/global.c b/gcc/global.c
index 0bacc23..af27ea0 100644
--- a/gcc/global.c
+++ b/gcc/global.c
@@ -1722,6 +1722,20 @@ build_insn_chain (first)
if (first == basic_block_end[b])
b++;
+
+ /* Stop after we pass the end of the last basic block. Verify that
+ no real insns are after the end of the last basic block.
+
+ We may want to reorganize the loop somewhat since this test should
+ always be the right exit test. */
+ if (b == n_basic_blocks)
+ {
+ for (first = NEXT_INSN (first) ; first; first = NEXT_INSN (first))
+ if (GET_RTX_CLASS (GET_CODE (first)) == 'i'
+ && GET_CODE (PATTERN (first)) != USE)
+ abort ();
+ break;
+ }
}
FREE_REG_SET (live_relevant_regs);
*p = 0;