This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch to DECL_ASSEMBLER_NAME handling
- To: gcc-patches at gcc dot gnu dot org
- Subject: Patch to DECL_ASSEMBLER_NAME handling
- From: Jason Merrill <jason at cygnus dot com>
- Date: Fri, 3 Mar 2000 16:38:08 -0800
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);