This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/16452] [3.5 regression] Register name lost when compiling with -O2


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]