]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
PR middle-end/20491
authoraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 2 Apr 2005 16:56:27 +0000 (16:56 +0000)
committeraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 2 Apr 2005 16:56:27 +0000 (16:56 +0000)
* final.c (alter_subreg): Don't call subreg_regno for a non-REG.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97444 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/final.c

index f9f53e008cf2f2521a4cc88d5edf41101b6b6c29..d03fcf914f292cba6f8f1b32fc28a7e04c89308b 100644 (file)
@@ -1,3 +1,8 @@
+2005-04-02  Alexandre Oliva  <aoliva@redhat.com>
+
+       PR middle-end/20491
+       * final.c (alter_subreg): Don't call subreg_regno for a non-REG.
+
 2005-04-02  Alexandre Oliva  <aoliva@redhat.com>
 
        PR rtl-optimization/20290
index ea842550cfbfca6af65cb871119ca6484c6d1938..aee4ea973fdb16893839fef45851b69037a6d462 100644 (file)
@@ -2547,11 +2547,10 @@ alter_subreg (rtx *xp)
 
       if (new != 0)
        *xp = new;
-      else
+      else if (REG_P (y))
        {
          /* Simplify_subreg can't handle some REG cases, but we have to.  */
          unsigned int regno = subreg_regno (x);
-         gcc_assert (REG_P (y));
          *xp = gen_rtx_REG_offset (y, GET_MODE (x), regno, SUBREG_BYTE (x));
        }
     }