https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98338
--- Comment #11 from Jan Hubicka <hubicka at ucw dot cz> --- > Honza, any ideas on this? The comment on assert says /* In LTO mode we may have speculative edges set. */ gcc_assert (in_lto_p || size_info->size == size_info->self_size); Which seems expected because the speculative edges are not accounted by self_size. So perhaps we simply want to track if there is speculative edge and disable the sanity check inthat case. Honza