This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug inline-asm/28686] ebp from clobber list used as operand
- From: "spark at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Jan 2007 00:28:25 -0000
- Subject: [Bug inline-asm/28686] ebp from clobber list used as operand
- References: <bug-28686-8905@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from spark at gcc dot gnu dot org 2007-01-31 00:28 -------
Looks like eliminable_regset is not cleared per every invocation of
global_alloc, making stale bits from the compilation of previous function hang
around - hence a presence of a previous function makes difference.
Following patch seems to fix -O2 problem.
I'm now on to -O1 and -O0 issues.
Index: global.c
===================================================================
--- global.c (revision 121353)
+++ global.c (working copy)
@@ -354,6 +354,7 @@ global_alloc (void)
are safe to use only within a basic block. */
CLEAR_HARD_REG_SET (no_global_alloc_regs);
+ CLEAR_HARD_REG_SET (eliminable_regset);
/* Build the regset of all eliminable registers and show we can't use those
that we already know won't be eliminated. */
@@ -2548,4 +2549,3 @@ struct tree_opt_pass pass_global_alloc =
TODO_ggc_collect, /* todo_flags_finish */
'g' /* letter */
};
-
--
spark at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |spark at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28686