> My earlier patch for 58678 caused this problem: even if we aren't > going to refer to the dtor thunks from the vtable, we need to emit > them in case other translation units use them. > > I'm adding xfails to two testcases: devirt-21.C and devirt-23.C. > The fails aren't a new bug; we are no longer seeing the > devirtualization because we remove the path to wrap() through a > virtual call to ~MultiTermDocs that it occurred along. But it seems > odd to me that it isn't happening on path through a non-virtual call > to ~MultiTermDocs, so I'm filing a bug about that.
MultiTermDocs::~MultiTermDocs() (struct MultiTermDocs * const this, const void * * __vtt_parm) { unsigned int i; int (*__vtbl_ptr_type) () * iftmp.6_4; struct A * _8; unsigned int _10; <bb 2>: iftmp.6_4 = *__vtt_parm_3(D); this_5(D)->_vptr.MultiTermDocs = iftmp.6_4; MultiTermDocs::wrap (this_5(D)); I belive the problem here is the _vptr.MultiTermDocs vtable is initialized from VTT that is not understood by ipa-prop jump functions. The other path has direct store of VPTR in it. Honza