On Mon, 4 Jun 2012, Jason Merrill wrote: > Please add a comment explaining why flag_generate_lto matters there. OK with > that change.
Committed as follows. Thanks, Richard. 2012-06-04 Richard Guenther <rguent...@suse.de> PR middle-end/53471 * dwarf2out.c (dwarf2out_finish): If generating LTO do not create new assembler names. Index: gcc/dwarf2out.c =================================================================== *** gcc/dwarf2out.c (revision 188176) --- gcc/dwarf2out.c (working copy) *************** dwarf2out_finish (const char *filename) *** 22158,22164 **** for (node = deferred_asm_name; node; node = node->next) { tree decl = node->created_for; ! if (DECL_ASSEMBLER_NAME (decl) != DECL_NAME (decl)) { add_linkage_attr (node->die, decl); move_linkage_attr (node->die); --- 22158,22168 ---- for (node = deferred_asm_name; node; node = node->next) { tree decl = node->created_for; ! /* 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);