From 9550206bcb7d4cced1ddc0db154fffbfdad4ed40 Mon Sep 17 00:00:00 2001 From: Roger Sayle Date: Thu, 3 Mar 2005 14:16:05 +0000 Subject: [PATCH] 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 From-SVN: r95830 --- gcc/ChangeLog | 6 ++++++ gcc/jump.c | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index db71b1e4e10..eb1ad100fb0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2005-03-03 Roger Sayle + Andrew Pinski + + * jump.c (redirect_exp_1): If nlabel is a NULL pointer create a + RETURN rtx, and not a LABEL_REF containing a NULL pointer. + 2005-03-03 Hans-Peter Nilsson Describe special registers SRP and MOF as allocatable registers. 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); -- 2.30.2