diff options
author | nickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-24 10:01:57 +0000 |
---|---|---|
committer | nickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-24 10:01:57 +0000 |
commit | d76b3d0f6bd4b19b12ed14ecd6249551b982ae41 (patch) | |
tree | 465befe53012dc2949df5b399c904e56c2918615 | |
parent | f0bf77c8320270f8e07fef3c543ab4ff1b42e16d (diff) | |
download | gcc-d76b3d0f6bd4b19b12ed14ecd6249551b982ae41.tar.gz |
* loop-unswitch.c (compare_and_jump_seq): Assert that the last
insn in the sequence is a jump insn before setting its label.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161313 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/loop-unswitch.c | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9d33f3a94fd..e9c077124bd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2010-06-24 Nick Clifton<nickc@redhat.com> + + * loop-unswitch.c (compare_and_jump_seq): Assert that the last + insn in the sequence is a jump insn before setting its label. + 2010-06-24 Alan Modra <amodra@gmail.com> * collect2.c (main): Match exactly --version and --help. diff --git a/gcc/loop-unswitch.c b/gcc/loop-unswitch.c index edf62fa8aa8..77524d8bfe3 100644 --- a/gcc/loop-unswitch.c +++ b/gcc/loop-unswitch.c @@ -110,6 +110,7 @@ compare_and_jump_seq (rtx op0, rtx op1, enum rtx_code comp, rtx label, int prob, gcc_assert (rtx_equal_p (op1, XEXP (cond, 1))); emit_jump_insn (copy_insn (PATTERN (cinsn))); jump = get_last_insn (); + gcc_assert (JUMP_P (jump)); JUMP_LABEL (jump) = JUMP_LABEL (cinsn); LABEL_NUSES (JUMP_LABEL (jump))++; redirect_jump (jump, label, 0); @@ -123,6 +124,7 @@ compare_and_jump_seq (rtx op0, rtx op1, enum rtx_code comp, rtx label, int prob, do_compare_rtx_and_jump (op0, op1, comp, 0, mode, NULL_RTX, NULL_RTX, label, -1); jump = get_last_insn (); + gcc_assert (JUMP_P (jump)); JUMP_LABEL (jump) = label; LABEL_NUSES (label)++; } |