https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104457
--- Comment #2 from Martin Jambor <jamborm at gcc dot gnu.org> --- I have made some substantial changes to how profile_counts are updated in IPA-CP, so trying the current master is definitely a good idea. It might just work and even if it does not, fixing it there would probably be quite a bit easier. If it persists even on master, please attach the dump generated by -fdump-ipa-cp-details - I would have a look by one generated by GCC 10 too but much less enthusiastically ;-) I would be fine demoting the assert to gcc_checking_assert.