https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88006
Bug ID: 88006 Summary: -fdebug-types-section gives undefined reference Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug Assignee: unassigned at gcc dot gnu.org Reporter: nathan at gcc dot gnu.org Target Milestone: --- Created attachment 44997 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44997&action=edit testcase -O1 or -O2 cause the problem This program results in undefined ref to _ZN3Foo4mfunEv this is not the same bug as 87462, the breaking commit appears to be r241753 2016-11-01 Jakub Jelinek <ja...@redhat.com> * dwarf2out.c (add_name_and_src_coords_attributes): Add NO_LINKAGE_NAME argument, don't call add_linkage_name if it is true. (gen_variable_die): For C++ inline static data members, consider the initial call when old_die is NULL to be declaration and call add_name_and_src_coords_attributes in that case with true as NO_LINKAGE_NAME. Add DW_AT_inline attribute if needed. (gen_member_die): For C++ inline static data members, emit a definition DIE right away in DW_TAG_compile_unit context.