https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69137
Jan Hubicka changed:
What|Removed |Added
Component|lto |debug
Assignee|hubicka at gcc dot gnu.org |unassigned at gcc dot
gnu.org
--- Comment #3 from Jan Hubicka ---
This patch makes the bug to reproduce at compile time:
Index: ../../gcc/tree-streamer-out.c
===
--- ../../gcc/tree-streamer-out.c (revision 232363)
+++ ../../gcc/tree-streamer-out.c (working copy)
@@ -31,6 +31,7 @@ along with GCC; see the file COPYING3.
#include "alias.h"
#include "stor-layout.h"
#include "gomp-constants.h"
+#include "ipa-utils.h"
/* Output the STRING constant to the string
@@ -308,6 +309,7 @@ pack_ts_function_decl_value_fields (stru
static void
pack_ts_type_common_value_fields (struct bitpack_d *bp, tree expr)
{
+ odr_type_p (expr);
/* for VECTOR_TYPE, TYPE_MODE reevaluates the mode using target_flags
not necessary valid in a global context.
Use the raw value previously set by layout_type. */
We ICE because of sanity check that non-anonymous namespace does not have
DECL_ASSEMBLER_NAME "":
(gdb) l
250 if (TYPE_NAME (t) && TREE_CODE (TYPE_NAME (t)) == TYPE_DECL
251 && DECL_ASSEMBLER_NAME_SET_P (TYPE_NAME (t)))
252 {
253 /* C++ FE uses magic as assembler names of anonymous
types.
254 verify that this match with type_in_anonymous_namespace_p. */
255 gcc_checking_assert (strcmp ("",
256 IDENTIFIER_POINTER
257 (DECL_ASSEMBLER_NAME (TYPE_NAME
(t);
(gdb) p debug_tree (t->type_common.name->decl_with_vis.assembler_name)
bindings <(nil)> local bindings
<(nil)>>
This is set:
#0 mangle_decl (decl=0x76c31720) at ../../gcc/cp/mangle.c:3602
#1 0x01363c10 in decl_assembler_name (decl=0x76c31720) at
../../gcc/tree.c:668
#2 0x00c01d63 in add_linkage_attr (die=0x76b010a0,
decl=0x76c31720) at ../../gcc/dwarf2out.c:18541
#3 0x00c0c606 in gen_typedef_die (decl=0x76c31720,
context_die=0x76b01050) at ../../gcc/dwarf2out.c:22421
#4 0x00c0f3b8 in gen_decl_die (decl=0x76c31720, origin=0x0,
ctx=0x0, context_die=0x76b01050) at ../../gcc/dwarf2out.c:23319
#5 0x00c0cea5 in gen_type_die_with_usage (type=0x76c30348,
context_die=0x76b01050, usage=DINFO_USAGE_DIR_USE) at
../../gcc/dwarf2out.c:22568
#6 0x00c0d5a5 in gen_type_die (type=0x76c30348,
context_die=0x76b01050) at ../../gcc/dwarf2out.c:22725
#7 0x00c0f3a0 in gen_decl_die (decl=0x76c31558, origin=0x0,
ctx=0x7fffdee0, context_die=0x76b01050) at ../../gcc/dwarf2out.c:23316
#8 0x00c0b7d1 in gen_member_die (type=0x76c30f18,
context_die=0x76b01050) at ../../gcc/dwarf2out.c:22198
#9 0x00c0c04f in gen_struct_or_union_type_die (type=0x76c30f18,
context_die=0x76b01000, usage=DINFO_USAGE_DIR_USE) at
../../gcc/dwarf2out.c:22304
#10 0x00c0ca4c in gen_tagged_type_die (type=0x76c30f18,
context_die=0x76b01000, usage=DINFO_USAGE_DIR_USE) at
../../gcc/dwarf2out.c:22505
#11 0x00c0d22d in gen_type_die_with_usage (type=0x76c30f18,
context_die=0x76b01000, usage=DINFO_USAGE_DIR_USE) at
../../gcc/dwarf2out.c:22670
#12 0x00c0d5a5 in gen_type_die (type=0x76c30f18,
context_die=0x76b01000) at ../../gcc/dwarf2out.c:22725
#13 0x00c0f3a0 in gen_decl_die (decl=0x76c31390, origin=0x0,
ctx=0x0, context_die=0x76b01000) at ../../gcc/dwarf2out.c:23316
#14 0x00c1054e in dwarf2out_decl (decl=0x76c31390) at
../../gcc/dwarf2out.c:23776
#15 0x00c0fa09 in dwarf2out_type_decl (decl=0x76c31390, local=0) at
../../gcc/dwarf2out.c:23486
#16 0x00f2b4af in rest_of_type_compilation (type=0x76c30f18,
toplev=1) at ../../gcc/passes.c:335
#17 0x0086faee in finish_struct_1 (t=0x76c30f18) at
../../gcc/cp/class.c:7037
#18 0x00870ab7 in finish_struct (t=0x76c30f18, attributes=0x0) at
../../gcc/cp/class.c:7203
#19 0x008d0ff9 in cp_parser_class_specifier_1 (parser=0x77ff8ab0)
at ../../gcc/cp/parser.c:21269
#20 0x008d1c40 in cp_parser_class_specifier (parser=0x77ff8ab0) at
../../gcc/cp/parser.c:21497
#21 0x008c6c2c in cp_parser_type_specifier (parser=0x77ff8ab0,
flags=1, decl_specs=0x7fffe780, is_declaration=true,
declares_class_or_enum=0x7fffe6f4,
is_cv_qualifier=0x7fffe6f3) at ../../gcc/cp/parser.c:15795
#22 0x008c1c31 in cp_parser_decl_specifier_seq (parser=0x77ff8ab0,
flags=1, decl_specs=0x7fffe780, declares_class_or_enum=0x7fffe824) at
../../gcc/cp/parser.c:12716
#23 0x008c11e2 in cp_parser_simple_declaration (parser=0x77ff8ab0,