This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/64346] gcc generates incorrect debug info for ctor/dtor
- From: "ccoutant at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 19 Dec 2014 18:41:18 +0000
- Subject: [Bug c++/64346] gcc generates incorrect debug info for ctor/dtor
- Auto-submitted: auto-generated
- References: <bug-64346-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64346
--- Comment #4 from Cary Coutant <ccoutant at gcc dot gnu.org> ---
I think the problem is that the decloning turns the C1 and C2 ctors into
thunks, and GCC doesn't (yet) generate debug info for thunks, so when you
inline the C4 into the C1 or C2, and inline that into foo, all that's left in
the debug info is the inlined call to the C4 ctor.
It looks like -fno-declone-ctors-dtor doesn't work around the problem because
the "need_alias" flag is true, and that forces the decloning in this case.
The most expedient approach might be for you to alias the C4/D4 names to the
official ones when processing the profile data. Is that feasible?