re PR target/26826 (ICE in reg_or_subregno, at jump.c:2011)
authorRichard Guenther <rguenther@suse.de>
Mon, 17 Apr 2006 13:53:19 +0000 (13:53 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 17 Apr 2006 13:53:19 +0000 (13:53 +0000)
2006-04-17  Richard Guenther  <rguenther@suse.de>

PR target/26826
* reload.c (push_reload): Guard calls to get_secondary_mem
for memory subregs.

From-SVN: r113007

gcc/ChangeLog
gcc/reload.c

index 4f39d985657793e484e5cc673205ff6ee18a86fe..af150ff0005467c4301f0f9a8158ab64dd54b73f 100644 (file)
@@ -1,3 +1,9 @@
+2006-04-17  Richard Guenther  <rguenther@suse.de>
+
+       PR target/26826
+       * reload.c (push_reload): Guard calls to get_secondary_mem
+       for memory subregs.
+
 2006-04-16  Kazu Hirata  <kazu@codesourcery.com>
 
        * alias.c (reg_base_value, old_reg_base_value): Change the
index 8a76c0ec8567391a826cf18d47ef811965b35bd9..e7798b9c41acb7f52ad3f7cce298f040197847cf 100644 (file)
@@ -1286,7 +1286,9 @@ push_reload (rtx in, rtx out, rtx *inloc, rtx *outloc,
 
 #ifdef SECONDARY_MEMORY_NEEDED
       /* If a memory location is needed for the copy, make one.  */
-      if (in != 0 && (REG_P (in) || GET_CODE (in) == SUBREG)
+      if (in != 0
+         && (REG_P (in)
+             || (GET_CODE (in) == SUBREG && REG_P (SUBREG_REG (in))))
          && reg_or_subregno (in) < FIRST_PSEUDO_REGISTER
          && SECONDARY_MEMORY_NEEDED (REGNO_REG_CLASS (reg_or_subregno (in)),
                                      class, inmode))
@@ -1316,7 +1318,9 @@ push_reload (rtx in, rtx out, rtx *inloc, rtx *outloc,
       n_reloads++;
 
 #ifdef SECONDARY_MEMORY_NEEDED
-      if (out != 0 && (REG_P (out) || GET_CODE (out) == SUBREG)
+      if (out != 0
+          && (REG_P (out)
+             || (GET_CODE (out) == SUBREG && REG_P (SUBREG_REG (out))))
          && reg_or_subregno (out) < FIRST_PSEUDO_REGISTER
          && SECONDARY_MEMORY_NEEDED (class,
                                      REGNO_REG_CLASS (reg_or_subregno (out)),