]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR middle-end/36238 (ICE in reg_or_subregno, at jump.c:1730)
authorAndrew Pinski <andrew_pinski@playstation.sony.com>
Sun, 10 Aug 2008 04:54:37 +0000 (04:54 +0000)
committerAndrew Pinski <pinskia@gcc.gnu.org>
Sun, 10 Aug 2008 04:54:37 +0000 (21:54 -0700)
2008-08-09  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR middle-end/36238
        * reload1.c (gen_reload): Guard calls to get_secondary_mem
        for memory subregs.

2008-08-09  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR middle-end/36238
        * gcc.c-torture/compile/pr36238.c: New testcase.

From-SVN: r138924

gcc/ChangeLog
gcc/reload1.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/pr36238.c [new file with mode: 0644]

index f1b96a7aecf4bb4721f7bd7ca2d8cc3924a60128..5451f9506066aaba7e86354e82b00f77ad9041a5 100644 (file)
@@ -1,3 +1,9 @@
+2008-08-09  Andrew Pinski  <andrew_pinski@playstation.sony.com>
+
+       PR middle-end/36238
+       * reload1.c (gen_reload): Guard calls to get_secondary_mem
+       for memory subregs.
+
 2008-08-09  Jan Hubicka  <jh@suse.cz>
 
        PR target/37055
index 9b81062216ffbb995bfb19da03465cda1359b245..3abd6b24e33b2b7a3754313eea5faae55673250f 100644 (file)
@@ -8009,9 +8009,11 @@ gen_reload (rtx out, rtx in, int opnum, enum reload_type type)
 
 #ifdef SECONDARY_MEMORY_NEEDED
   /* If we need a memory location to do the move, do it that way.  */
-  else if ((REG_P (in) || GET_CODE (in) == SUBREG)
+  else if ((REG_P (in)
+            || (GET_CODE (in) == SUBREG && REG_P (SUBREG_REG (in))))
           && reg_or_subregno (in) < FIRST_PSEUDO_REGISTER
-          && (REG_P (out) || GET_CODE (out) == SUBREG)
+          && (REG_P (out)
+              || (GET_CODE (out) == SUBREG && REG_P (SUBREG_REG (out))))
           && reg_or_subregno (out) < FIRST_PSEUDO_REGISTER
           && SECONDARY_MEMORY_NEEDED (REGNO_REG_CLASS (reg_or_subregno (in)),
                                       REGNO_REG_CLASS (reg_or_subregno (out)),
index de65eae1a1f8a729ca14b23cd3dc7f3acfa2008f..c73e8bc9d5829a4619d8fc33ec91ee52100e3103 100644 (file)
@@ -1,3 +1,8 @@
+2008-08-09  Andrew Pinski  <andrew_pinski@playstation.sony.com>
+
+       PR middle-end/36238
+       * gcc.c-torture/compile/pr36238.c: New testcase.
+
 2008-08-09  Richard Sandiford  <rdsandiford@googlemail.com>
 
        * lib/target-supports.exp (check_profiling_available): Return false
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr36238.c b/gcc/testsuite/gcc.c-torture/compile/pr36238.c
new file mode 100644 (file)
index 0000000..358e1ff
--- /dev/null
@@ -0,0 +1,27 @@
+typedef signed char int8_t;
+typedef int int32_t;
+typedef unsigned short int uint16_t;
+typedef unsigned int uint32_t;
+int32_t g_19 = 0x67F5AEE0L;
+uint16_t g_169 = 0x89E3L;
+const volatile uint32_t g_258 = 0x63AFEBCAL;
+int32_t func_11;
+int32_t func_29;
+int32_t
+func_5 (int32_t p_6, int32_t p_8, uint16_t p_10)
+{
+  if (lshift_s_s (func_11, p_8))
+    {
+      int8_t l_18 = 0x6FL;
+      if (l_18)
+        for (p_6 = -14;; g_19 += 6)
+          {
+            int32_t l_283 = -1L;
+            if (((0x45L / 1L) > 0x07414511L * 1L / 1L > func_29) / 1L)
+              for (p_8 = 6;; p_8 -= 5)
+                l_283 = 0xC90541F7L;
+          }
+    }
+  else
+    g_169 = g_258;
+}