jump.c (redirect_exp_1): If nlabel is a NULL pointer create a RETURN rtx...
authorRoger Sayle <roger@eyesopen.com>
Thu, 3 Mar 2005 14:16:05 +0000 (14:16 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Thu, 3 Mar 2005 14:16:05 +0000 (14:16 +0000)
* 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

gcc/ChangeLog
gcc/jump.c

index db71b1e4e1091bc17874720b665ec3306f07ee90..eb1ad100fb0cfcbed8843fd8cbdd5fe781ac9385 100644 (file)
@@ -1,3 +1,9 @@
+2005-03-03  Roger Sayle  <roger@eyesopen.com>
+           Andrew Pinski  <pinskia@physics.uc.edu>
+
+       * 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  <hp@axis.com>
 
        Describe special registers SRP and MOF as allocatable registers.
index 4af8b5a5a10ecec62e944d51d954b6ec9b0b1b9e..2bf4b2a50843bf232c3d9d9d7119880d18213601 100644 (file)
@@ -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);