[PATCH][C++] Fix PR38334, TBAA issues with vtbl loads
Tue Dec 2 20:02:00 GMT 2008
On Tue, 2 Dec 2008, Mark Mitchell wrote:
> Richard Guenther wrote:
> > vtbl_ptr_type_node is correct, but there is no vtbl_ptr_type member
> > in the structure we are accessing.
> Why not? I thought a C++ class with a virtual function would have a
> member in it that corresponds to the virtual table pointer (possibly
> inside nested structures).
I think we do not need to know the class in this case dealing with
> In any case, how about using build_vfn_ref here? It looks to me like
> that's a type-correct function.
It cannot deal with an instance pointer of the form
*(&((struct Container *) this)->item + (unsigned int) itemfun.__delta).
That said, any other ideas are of course appreciated ;) The testcase
that triggers the warning is g++.dg/opt/pmf1.C if you apply
More information about the Gcc-patches