aboutsummaryrefslogtreecommitdiff
path: root/gcc/reload1.c
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/reload1.c
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/reload1.c')
-rw-r--r--gcc/reload1.c6
1 files changed, 4 insertions, 2 deletions
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)),