https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115649
Bug ID: 115649 Summary: Non-ABI constructor (C4) emitted in DWARF .debug_info Product: gcc Version: 8.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug Assignee: unassigned at gcc dot gnu.org Reporter: devengangwani12 at gmail dot com Target Milestone: --- Minimal example: --- //test.cpp struct A { int p; A(int a): p(a) {} virtual ~A() {} }; struct A1: public A { int q; A1(int b): A(b - 1), q(b) {} ~A1() {} }; int main() { A1 new_A1 = A1(5); return new_A1.p; } --- Platform: x86_64 Compile with: g++ -g -c test.cpp Relevant output of readelf -Ws test.o: 15: 0000000000000000 0 NOTYPE LOCAL DEFAULT 1 _ZN1AC5Ei 17: 0000000000000000 0 NOTYPE LOCAL DEFAULT 3 _ZN2A1C5Ei 19: 0000000000000000 42 FUNC WEAK DEFAULT 15 _ZN1AC2Ei 21: 0000000000000000 42 FUNC WEAK DEFAULT 15 _ZN1AC1Ei 26: 0000000000000000 66 FUNC WEAK DEFAULT 21 _ZN2A1C2Ei 28: 0000000000000000 66 FUNC WEAK DEFAULT 21 _ZN2A1C1Ei Relevant output of dwarfdump -i test.o or readelf -Wwi test.o: <41> DW_AT_linkage_name: (strp) (offset: 0x117): _ZN2A1C4ERKS_ <66> DW_AT Linkage_name: (strp) (offset: 0xff): _ZN2A1C4Ei <b0> DW_AT_linkage_name: (strp) (offset: 0x10a): _ZNIAC4ERKS_ <de> DW AT_linkage_name: (strp) (offset: 0xfo): _ZN1AC4Ei <22b> DW_AT_linkage_name: (strp) (offset: 0x3): _ZN2A1C2Ei <2f7> DW_AT_ linkage_name: (strp) (offset: 0xbe): _ZN1AC2Ei [all are DW_TAG_subprograms] The linkage names should conform to the ABI which doesn't include C4 constructors (at least according to this: https://itanium-cxx-abi.github.io/cxx-abi/abi.html).