http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52972
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-04-13 16:24:07 UTC --- I think you are getting the correct behavior as the vtable for the base class is the current vtable for this. And " return static_cast < Real* > (this);" Does not change the vtable of the return class.