This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix PR26826
- From: Richard Guenther <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 23 Mar 2006 22:28:10 +0100 (CET)
- Subject: [PATCH] Fix PR26826
This fixes PR26826, as advised by bonzini.
Bootstrapped and tested on i686, x86_64, ppc, ppc64, s390, s390x and ia64
for all languages including Ada on checking enabled 4.1 branch.
Ok for mainline and 4.1?
Thanks,
Richard.
:ADDPATCH reload:
Index: gcc/reload.c
===================================================================
*** gcc/reload.c (revision 112281)
--- gcc/reload.c (working copy)
*************** push_reload (rtx in, rtx out, rtx *inloc
*** 1277,1283 ****
#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)
&& reg_or_subregno (in) < FIRST_PSEUDO_REGISTER
&& SECONDARY_MEMORY_NEEDED (REGNO_REG_CLASS (reg_or_subregno (in)),
class, inmode))
--- 1277,1285 ----
#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 && REG_P (SUBREG_REG (in))))
&& reg_or_subregno (in) < FIRST_PSEUDO_REGISTER
&& SECONDARY_MEMORY_NEEDED (REGNO_REG_CLASS (reg_or_subregno (in)),
class, inmode))
*************** push_reload (rtx in, rtx out, rtx *inloc
*** 1307,1313 ****
n_reloads++;
#ifdef SECONDARY_MEMORY_NEEDED
! if (out != 0 && (REG_P (out) || GET_CODE (out) == SUBREG)
&& reg_or_subregno (out) < FIRST_PSEUDO_REGISTER
&& SECONDARY_MEMORY_NEEDED (class,
REGNO_REG_CLASS (reg_or_subregno (out)),
--- 1309,1317 ----
n_reloads++;
#ifdef SECONDARY_MEMORY_NEEDED
! 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)),