aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAndrew Pinski <andrew_pinski@playstation.sony.com>2008-08-10 04:54:37 +0000
committerAndrew Pinski <pinskia@gcc.gnu.org>2008-08-09 21:54:37 -0700
commitd47c3b4eb17c16582507840c61be4ad05884116b (patch)
treec149bf8c75bc08c37cb16f001d258a57a1c07bdf /gcc
parent34c66dafcf2dd526e905e53d30828101fecf7eae (diff)
downloadgcc-d47c3b4eb17c16582507840c61be4ad05884116b.zip
gcc-d47c3b4eb17c16582507840c61be4ad05884116b.tar.gz
gcc-d47c3b4eb17c16582507840c61be4ad05884116b.tar.bz2
re PR middle-end/36238 (ICE in reg_or_subregno, at jump.c:1730)
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/reload1.c6
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr36238.c27
4 files changed, 42 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f1b96a7..5451f95 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 9b81062..3abd6b2 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -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)),
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index de65eae..c73e8bc 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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
index 0000000..358e1ff
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr36238.c
@@ -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;
+}