aboutsummaryrefslogtreecommitdiff
path: root/gcc/jump.c
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2005-03-03 14:16:05 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2005-03-03 14:16:05 +0000
commit9550206bcb7d4cced1ddc0db154fffbfdad4ed40 (patch)
tree85761cda8c8770ba9a76fdc8f412a2b653813e7f /gcc/jump.c
parent442dca704c233409d612f5f7d6cd07afec04b977 (diff)
downloadgcc-9550206bcb7d4cced1ddc0db154fffbfdad4ed40.zip
gcc-9550206bcb7d4cced1ddc0db154fffbfdad4ed40.tar.gz
gcc-9550206bcb7d4cced1ddc0db154fffbfdad4ed40.tar.bz2
jump.c (redirect_exp_1): If nlabel is a NULL pointer create a RETURN rtx...
* jump.c (redirect_exp_1): If nlabel is a NULL pointer create a RETURN rtx, and not a LABEL_REF containing a NULL pointer. Co-Authored-By: Andrew Pinski <pinskia@physics.uc.edu> From-SVN: r95830
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 4af8b5a..2bf4b2a 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);