summaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-06-04 13:19:17 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-06-04 13:19:17 +0000
commitc909c89a8f91fb820083a980ae81f44681d8cec0 (patch)
tree894ff853617b0f0112b3349efc42483651a859a5 /gcc/dwarf2out.c
parentf83623cc5a98293d1a649337efe310f572a065cf (diff)
downloadgcc-c909c89a8f91fb820083a980ae81f44681d8cec0.tar.gz
2012-06-04 Richard Guenther <rguenther@suse.de>
PR middle-end/53471 * dwarf2out.c (dwarf2out_finish): If generating LTO do not create new assembler names. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@188181 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index babc5ba51f3..c1492b0f0ef 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -22158,7 +22158,11 @@ dwarf2out_finish (const char *filename)
for (node = deferred_asm_name; node; node = node->next)
{
tree decl = node->created_for;
- if (DECL_ASSEMBLER_NAME (decl) != DECL_NAME (decl))
+ /* When generating LTO bytecode we can not generate new assembler
+ names at this point and all important decls got theirs via
+ free-lang-data. */
+ if ((!flag_generate_lto || DECL_ASSEMBLER_NAME_SET_P (decl))
+ && DECL_ASSEMBLER_NAME (decl) != DECL_NAME (decl))
{
add_linkage_attr (node->die, decl);
move_linkage_attr (node->die);