https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78871
Bug ID: 78871 Summary: Anonymous namespace and -flto -gsplit-dwarf: ICE in lhd_decl_printable_name, at langhooks.c:215 Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug Assignee: unassigned at gcc dot gnu.org Reporter: trippels at gcc dot gnu.org Target Milestone: --- All supported gcc versions are affected: markus@x4 ~ % cat Util.ii namespace { void foo() {} } markus@x4 ~ % g++ -flto -gsplit-dwarf Util.ii Util.ii: In function ‘foo’: Util.ii:2:13: internal compiler error: in lhd_decl_printable_name, at langhooks.c:215 void foo() {} ^ 0x8eec74 lhd_decl_printable_name(tree_node*, int) /home/markus/gcc/gcc/langhooks.c:215 0x6ffa74 gen_namespace_die /home/markus/gcc/gcc/dwarf2out.c:25009 0x6ffa74 gen_decl_die /home/markus/gcc/gcc/dwarf2out.c:25215 0x70078e dwarf2out_decl /home/markus/gcc/gcc/dwarf2out.c:25628 0x706c2f force_decl_die /home/markus/gcc/gcc/dwarf2out.c:24847 0x706de5 declare_in_namespace /home/markus/gcc/gcc/dwarf2out.c:24947 0x700127 declare_in_namespace /home/markus/gcc/gcc/dwarf2out.c:24918 0x700127 gen_decl_die /home/markus/gcc/gcc/dwarf2out.c:25116 0x70078e dwarf2out_decl /home/markus/gcc/gcc/dwarf2out.c:25628 0x700cde dwarf2out_function_decl /home/markus/gcc/gcc/dwarf2out.c:25643 0x7762ef rest_of_handle_final /home/markus/gcc/gcc/final.c:4506 0x7762ef execute /home/markus/gcc/gcc/final.c:4548 Please submit a full bug report,