From: Andrew Pinski Date: Sun, 10 Aug 2008 04:54:37 +0000 (+0000) Subject: re PR middle-end/36238 (ICE in reg_or_subregno, at jump.c:1730) X-Git-Tag: releases/gcc-4.4.0~3206 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d47c3b4eb17c16582507840c61be4ad05884116b;p=thirdparty%2Fgcc.git re PR middle-end/36238 (ICE in reg_or_subregno, at jump.c:1730) 2008-08-09 Andrew Pinski PR middle-end/36238 * reload1.c (gen_reload): Guard calls to get_secondary_mem for memory subregs. 2008-08-09 Andrew Pinski PR middle-end/36238 * gcc.c-torture/compile/pr36238.c: New testcase. From-SVN: r138924 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f1b96a7aecf4..5451f9506066 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2008-08-09 Andrew Pinski + + PR middle-end/36238 + * reload1.c (gen_reload): Guard calls to get_secondary_mem + for memory subregs. + 2008-08-09 Jan Hubicka PR target/37055 diff --git a/gcc/reload1.c b/gcc/reload1.c index 9b81062216ff..3abd6b24e33b 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 de65eae1a1f8..c73e8bc9d582 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2008-08-09 Andrew Pinski + + PR middle-end/36238 + * gcc.c-torture/compile/pr36238.c: New testcase. + 2008-08-09 Richard Sandiford * 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 000000000000..358e1ff5e28a --- /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; +}