[Bug c++/77896] Object vtable lookups are not hoisted out of loops

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Oct 8 01:51:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77896

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Ryan Johnson from comment #1)
> Given that an object's vtable is fixed over its lifetime,

Yes but functions including virtual functions can deconstruct the object and
then call inplacement new on the same object and change what the type is for
that object.  So saying the object's vtable is fixed is correct but the
lifetime of the object is not fixed.


More information about the Gcc-bugs mailing list