aboutsummaryrefslogtreecommitdiff
path: root/gcc/jump.c
diff options
context:
space:
mode:
authorChung-Lin Tang <cltang@codesourcery.com>2011-11-23 13:22:30 +0000
committerChung-Lin Tang <cltang@gcc.gnu.org>2011-11-23 13:22:30 +0000
commitb1ab2759ab326ae20cd0023c4e0873e16517cc49 (patch)
tree99a3cfbaefa0bd6d3d48f0c519fe46c9647f0d48 /gcc/jump.c
parentbc6e33a3876d732c010d252462a44dedb248657a (diff)
downloadgcc-b1ab2759ab326ae20cd0023c4e0873e16517cc49.zip
gcc-b1ab2759ab326ae20cd0023c4e0873e16517cc49.tar.gz
gcc-b1ab2759ab326ae20cd0023c4e0873e16517cc49.tar.bz2
re PR rtl-optimization/50496 (ICE in redirect_jump, at jump.c:1497)
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. From-SVN: r181664
Diffstat (limited to 'gcc/jump.c')
-rw-r--r--gcc/jump.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/gcc/jump.c b/gcc/jump.c
index f852f82..52cbbca 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;