[Bug ipa/62051] [4.9/5 Regression] Undefined reference to vtable with -O2 and -fdevirtualize-speculatively

trippels at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Mar 19 10:38:00 GMT 2015


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

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |trippels at gcc dot gnu.org

--- Comment #3 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
If you define "void Derived::func()" directly in the header if works
as expected. 
And since ~Derived() calls this function you must provide it in every
compilation unit.
So the devirtualization looks correct to me.



More information about the Gcc-bugs mailing list