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

rearnsha at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Mon Jul 12 13:29:00 GMT 2004


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



More information about the Gcc-bugs mailing list