This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/52972] Pure virtual method is called instead of child's method
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 13 Apr 2012 16:24:07 +0000
- Subject: [Bug c++/52972] Pure virtual method is called instead of child's method
- Auto-submitted: auto-generated
- References: <bug-52972-4@http.gcc.gnu.org/bugzilla/>
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.