https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64043
--- Comment #8 from Jan Hubicka <hubicka at gcc dot gnu.org> --- The following patch should help. Still need to work out why flag_devirtualize is set at final link - it should not Index: tree.c =================================================================== --- tree.c (revision 218658) +++ tree.c (working copy) @@ -11870,6 +11870,11 @@ if (TREE_CODE (target) == FUNCTION_TYPE) return false; gcc_checking_assert (TREE_CODE (target) == METHOD_TYPE); + /* If we do not have BINFO associated, it means that type was built + without devirtualization enabled. Do not consider this a virtual + call. */ + if (!TYPE_BINFO (obj_type_ref_class (target))) + return false; return true; }