This is the mail archive of the gcc-patches@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]

Patch to DECL_ASSEMBLER_NAME handling


If we change how we plan to refer to a symbol in the assembly output,
we should update DECL_ASSEMBLER_NAME accordingly; otherwise,
TREE_SYMBOL_REFERENCED is useless for nested inlines.

Fixes various local class testcases in the g++ testsuite.

2000-03-03  Jason Merrill  <jason@casey.cygnus.com>

	* varasm.c (make_function_rtl): If we change the name used in the
	rtl, update DECL_ASSEMBLER_NAME accordingly.
	(make_decl_rtl): Likewise.

Index: varasm.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/varasm.c,v
retrieving revision 1.101
diff -c -p -r1.101 varasm.c
*** varasm.c	2000/03/02 23:30:38	1.101
--- varasm.c	2000/03/03 23:56:13
*************** make_function_rtl (decl)
*** 553,558 ****
--- 553,559 ----
  
    if (DECL_RTL (decl) == 0)
      {
+       DECL_ASSEMBLER_NAME (decl) = get_identifier (name);
        DECL_RTL (decl)
  	= gen_rtx_MEM (DECL_MODE (decl),
  		       gen_rtx_SYMBOL_REF (Pmode, name));
*************** make_decl_rtl (decl, asmspec, top_level)
*** 792,797 ****
--- 793,799 ----
  	      name = new_name;
  	    }
  
+ 	  DECL_ASSEMBLER_NAME (decl) = get_identifier (name);
  	  DECL_RTL (decl) = gen_rtx_MEM (DECL_MODE (decl),
  					 gen_rtx_SYMBOL_REF (Pmode, name));
  	  MEM_ALIAS_SET (DECL_RTL (decl)) = get_alias_set (decl);

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