This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ PATCH for c++/60566 (dtor devirtualization and missing thunks)
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Jason Merrill <jason at redhat dot com>
- Cc: gcc-patches List <gcc-patches at gcc dot gnu dot org>, Jan Hubicka <hubicka at ucw dot cz>
- Date: Thu, 27 Mar 2014 06:42:22 +0100
- Subject: Re: C++ PATCH for c++/60566 (dtor devirtualization and missing thunks)
- Authentication-results: sourceware.org; auth=none
- References: <53330512 dot 2090408 at redhat dot com>
> 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