This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/16452] [3.5 regression] Register name lost when compiling with -O2
- From: "rearnsha at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Jul 2004 13:29:34 -0000
- Subject: [Bug c/16452] [3.5 regression] Register name lost when compiling with -O2
- References: <20040709142319.16452.reichelt@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From rearnsha at gcc dot gnu dot org 2004-07-12 13:29 -------
I'm currently testing the following patch:
Index: toplev.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/toplev.c,v
retrieving revision 1.908
diff -p -r1.908 toplev.c
*** toplev.c 30 Jun 2004 17:58:20 -0000 1.908
--- toplev.c 12 Jul 2004 13:29:19 -0000
*************** check_global_declarations (tree *vec, in
*** 815,821 ****
decl = vec[i];
if (TREE_CODE (decl) == VAR_DECL && TREE_STATIC (decl)
! && ! TREE_ASM_WRITTEN (decl))
/* Cancel the RTL for this decl so that, if debugging info
output for global variables is still to come,
this one will be omitted. */
--- 815,821 ----
decl = vec[i];
if (TREE_CODE (decl) == VAR_DECL && TREE_STATIC (decl)
! && ! TREE_ASM_WRITTEN (decl) && ! DECL_REGISTER (decl))
/* Cancel the RTL for this decl so that, if debugging info
output for global variables is still to come,
this one will be omitted. */
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16452