diff options
author | cltang <cltang@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-23 13:22:30 +0000 |
---|---|---|
committer | cltang <cltang@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-23 13:22:30 +0000 |
commit | e1e505520d386c2940c3f736a57d074f4c7b6bea (patch) | |
tree | 99a3cfbaefa0bd6d3d48f0c519fe46c9647f0d48 /gcc | |
parent | 5a9eb973e0ea20ac6502be049b8d637d0d608844 (diff) | |
download | gcc-e1e505520d386c2940c3f736a57d074f4c7b6bea.tar.gz |
2011-11-23 Chung-Lin Tang <cltang@codesourcery.com>
PR rtl-optimization/50496
* jump.c (redirect_jump): Assert fail on nlabel == NULL_RTX
only after epilogue is created. Add comments.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181664 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/jump.c | 13 |
2 files changed, 18 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index abd83806d00..4e574a03086 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-11-23 Chung-Lin Tang <cltang@codesourcery.com> + + PR rtl-optimization/50496 + * jump.c (redirect_jump): Assert fail on nlabel == NULL_RTX + only after epilogue is created. Add comments. + 2011-11-22 Richard Henderson <rth@redhat.com> * config/ia64/ia64.c (ia64_expand_atomic_op): Add model parameter. diff --git a/gcc/jump.c b/gcc/jump.c index f852f827729..52cbbca43db 100644 --- a/gcc/jump.c +++ b/gcc/jump.c @@ -1495,7 +1495,18 @@ redirect_jump (rtx jump, rtx nlabel, int delete_unused) { rtx olabel = JUMP_LABEL (jump); - gcc_assert (nlabel != NULL_RTX); + if (!nlabel) + { + /* If there is no label, we are asked to redirect to the EXIT block. + When before the epilogue is emitted, return/simple_return cannot be + created so we return 0 immediately. After the epilogue is emitted, + we always expect a label, either a non-null label, or a + return/simple_return RTX. */ + + if (!epilogue_completed) + return 0; + gcc_unreachable (); + } if (nlabel == olabel) return 1; |