Hi, my first fix was just partial and fixed ICE in one branch not in other. The issue is that code does not expect cxa_pure_virtual in target list and ICEs handling it as a method while checking whether it should suggest final.
Bootstrapped/regtested x86_64-linux, comitted. ipa/69630 * ipa-devirt.c (possible_polymorphic_call_targets): Do not ICE on cxa_pure_virtual. Index: ipa-devirt.c =================================================================== --- ipa-devirt.c (revision 234108) +++ ipa-devirt.c (working copy) @@ -3177,11 +3177,11 @@ possible_polymorphic_call_targets (tree if (!outer_type->all_derivations_known) { - if (!speculative && final_warning_records) + if (!speculative && final_warning_records + && TREE_CODE (TREE_TYPE (nodes[0]->decl)) == METHOD_TYPE) { if (complete && nodes.length () == 1 - && TREE_CODE (TREE_TYPE (nodes[0]->decl)) == METHOD_TYPE && warn_suggest_final_types && !outer_type->derived_types.length ()) {