https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123226
--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jan Hubicka <[email protected]>: https://gcc.gnu.org/g:9765a730758e53f499004aad48646fb410e7fb6d commit r16-7319-g9765a730758e53f499004aad48646fb410e7fb6d Author: Jan Hubicka <[email protected]> Date: Thu Feb 5 12:30:50 2026 +0100 Fix speculative devirtualization ICE this patch fixes cgraph verifier ICE about missing indirect call in the speculative call sequence. This is triggered when tree-inline manages to devirtualize call during folding it does and the call has multiple specualtive targets. cgraph_update_edges_for_call_stmt_node calls cgraph_edge::resolve_speculation which resolves one edge, but it should make the whole sequence direct which is done by cgraph_edge::make_direct. The code was also handling the case that call changed but it is not direct. This should be impossible (and would require similar updating) so I added unreachable. Bootstrapped/regtested x86_64-linux and also tested with autofdo and spec2017. gcc/ChangeLog: PR ipa/123226 * cgraph.cc (cgraph_update_edges_for_call_stmt_node): Fix handling of multi-target speculations resolved at clone materialization time
