--- Begin Message ---
- From: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- To: gcc-patches at gcc dot gnu dot org
- Cc: andris at hal dot astr dot lu dot lv
- Date: Sun, 09 Feb 2003 14:24:00 +0100
- Subject: Fixing PR optimization/9258 and PR fortran/7681 on 3.3 branch.
- Organization: Moene Computational Physics, Maartensdijk, The Netherlands
L.S.,
As far as I can determine, the attached patch by Jan Hubicka which
solves the indicated PR's should still be applied to the 3.3 branch.
Just for checks I performed make bootstrap, make -k check on
powerpc-unknown-linux-gnu, but the problem exists on the ix86 architecture.
Andris, could you do a bootstrap & check with this patch to see if it
fixes the pr9258.f failures that occur in your submission to
gcc-testresults ?
Thanks in advance,
--
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
GNU Fortran 95: http://gcc-g95.sourceforge.net/ (under construction)
2003-02-09 Jan Hubicka <jh@suse.cz>
PR optimization/9258, PR fortran/7681
* global.c (struct allocno): Add no_stack_reg.
(global_conflicts): Set it.
(find_reg): Use it.
*** global.c.orig Fri Jan 3 23:24:35 2003
--- global.c Sun Feb 9 11:57:54 2003
*************** struct allocno
*** 131,134 ****
--- 131,139 ----
HARD_REG_SET regs_someone_prefers;
+
+ #ifdef STACK_REGS
+ /* Set to true if allocno can't be allocated in the stack register. */
+ bool no_stack_reg;
+ #endif
};
*************** global_conflicts ()
*** 707,712 ****
break;
if (e != NULL)
! for (ax = FIRST_STACK_REG; ax <= LAST_STACK_REG; ax++)
! record_one_conflict (ax);
}
#endif
--- 712,723 ----
break;
if (e != NULL)
! {
! EXECUTE_IF_SET_IN_ALLOCNO_SET (allocnos_live, ax,
! {
! allocno[ax].no_stack_reg = 1;
! });
! for (ax = FIRST_STACK_REG; ax <= LAST_STACK_REG; ax++)
! record_one_conflict (ax);
! }
}
#endif
*************** find_reg (num, losers, alt_regs_p, accep
*** 1205,1208 ****
--- 1216,1223 ----
mode)
#endif
+ #ifdef STACK_REGS
+ && (!allocno[num].no_stack_reg
+ || regno < FIRST_STACK_REG || regno > LAST_STACK_REG)
+ #endif
)
{
--- End Message ---