https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87089
Jason Merrill <jason at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEW Assignee|jason at gcc dot gnu.org |unassigned at gcc dot gnu.org --- Comment #12 from Jason Merrill <jason at gcc dot gnu.org> --- (In reply to Jan Hubicka from comment #9) > This is caused by: > > _ZN4itpp1cILNS_1aE0EED2Ev/1 (itpp::c<<anonymous> >::~c() [with itpp::a > Referring: _ZN4itpp1cILNS_1aE0EED1Ev/2 (alias) > > this is a destructor which is pointed to from virutal table, but it has no > DECL_VIRTUAL_P flag set. This makes free_lang_data to modify its context and > point to outer namespace rather than the containing polymorphic type. > > Why we do not set VIRTUAL_P here? This is the base (D2) variant of the destructor, which is not virtual and does not appear in the vtable; the complete (D1) variant of the destructor is virtual and does appear in the vtable, and in this case is an alias for the base variant. I imagine that LTO is treating them as interchangeable, which causes trouble here. Unassigning myself.