* final.c (alter_subreg): Assign REGNO after changing the rtx code.
authorRichard Henderson <rth@gcc.gnu.org>
Mon, 31 Dec 2001 21:33:36 +0000 (13:33 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Mon, 31 Dec 2001 21:33:36 +0000 (13:33 -0800)
From-SVN: r48432

gcc/final.c

index e875a7e8a7a51f7aace2176caea3e2ee5e1f6ae9..ffad9aef32cc391ddaf567c7030b5f06064d37ee 100644 (file)
@@ -2754,8 +2754,9 @@ alter_subreg (xp)
       /* Simplify_subreg can't handle some REG cases, but we have to.  */
       else if (GET_CODE (y) == REG)
        {
-         REGNO (x) = subreg_hard_regno (x, 1);
+         unsigned int regno = subreg_hard_regno (x, 1);
          PUT_CODE (x, REG);
+         REGNO (x) = regno;
          ORIGINAL_REGNO (x) = ORIGINAL_REGNO (y);
          /* This field has a different meaning for REGs and SUBREGs.  Make
             sure to clear it!  */