[Bug ipa/66223] [5/6 Regression] Diagnostic of pure virtual function call broken, including __cxa_pure_virtual
hubicka at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jan 19 16:56:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66223
--- Comment #11 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Jakub,
sorry, I missed your comment before committing the patch. I have no strong
opinions on this. Clearly falling into builtin_unreachable is uncomfortable
experience as it often leads to no useful segfault and bracktrace and the
chances that we actually devirtualize to cxa_pure_virtual is pretty low as I
checked on firefox where we have no such call in the resulting binary (we
produce some during IPA stage, but they are later optimized out as unreachable)
What is much more common is a call of a type that is not compatible with given
instance (because the actual type was dynamically checked earlier) in this case
we still do builtin_unreachable.
Both cxa_pure_virtual and bultin_unreachable appearing as single target is
taken as a hint that the call is unlikely by IPA optimizers.
More information about the Gcc-bugs
mailing list