https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122456
--- Comment #30 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #28)
> Possibly simple workaround:
>
> diff --git a/gcc/cgraph.cc b/gcc/cgraph.cc
> index 3c21e174943..0f63118b6c9 100644
> --- a/gcc/cgraph.cc
> +++ b/gcc/cgraph.cc
> @@ -1528,6 +1528,7 @@ cgraph_edge::resolve_speculation (cgraph_edge *edge,
> tree callee_decl)
> ref = e2->speculative_call_target_ref ();
> edge = edge->speculative_call_indirect_edge ();
> if (!callee_decl
> + || !symtab_node::get (callee_decl)
> || !ref->referred->semantically_equivalent_p
> (symtab_node::get (callee_decl)))
> {
That fixes the issue on x86_64-linux.