From ad16e152561fe6bd408f864a4d8a13cab38691af Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Mon, 4 Jun 2012 13:19:17 +0000 Subject: [PATCH] re PR lto/53471 (ICE in pp_base_format, at pretty-print.c:510 (-flto -g)) 2012-06-04 Richard Guenther PR middle-end/53471 * dwarf2out.c (dwarf2out_finish): If generating LTO do not create new assembler names. From-SVN: r188181 --- gcc/ChangeLog | 6 ++++++ gcc/dwarf2out.c | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7722dd587e7..f53bdb641be 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2012-06-04 Richard Guenther + + PR middle-end/53471 + * dwarf2out.c (dwarf2out_finish): If generating LTO do not + create new assembler names. + 2012-06-04 Richard Guenther * tree-data-ref.c (struct rdg_vertex_info): Remove. 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);