summaryrefslogtreecommitdiffstats
path: root/gcc/jump.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/jump.c')
-rw-r--r--gcc/jump.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/jump.c b/gcc/jump.c
index 4af8b5a5a10..2bf4b2a5084 100644
--- a/gcc/jump.c
+++ b/gcc/jump.c
@@ -1539,7 +1539,10 @@ redirect_exp_1 (rtx *loc, rtx olabel, rtx nlabel, rtx insn)
}
else if (code == RETURN && olabel == 0)
{
- x = gen_rtx_LABEL_REF (VOIDmode, nlabel);
+ if (nlabel)
+ x = gen_rtx_LABEL_REF (VOIDmode, nlabel);
+ else
+ x = gen_rtx_RETURN (VOIDmode);
if (loc == &PATTERN (insn))
x = gen_rtx_SET (VOIDmode, pc_rtx, x);
validate_change (insn, loc, x, 1);
OpenPOWER on IntegriCloud