https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118318
--- Comment #21 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Martin Jambor <jamb...@gcc.gnu.org>: https://gcc.gnu.org/g:7deb498425799aceb7659ea25614175a49533184 commit r15-7891-g7deb498425799aceb7659ea25614175a49533184 Author: Martin Jambor <mjam...@suse.cz> Date: Fri Mar 7 17:17:24 2025 +0100 ipa-cp: Avoid ICE when redistributing nodes among edges to recursive clones (PR 118318) PR 118318 reported an ICE during PGO build of Firefox when IPA-CP, in the final stages of update_counts_for_self_gen_clones where it attempts to guess how to distribute profile count among clones created for recursive edges and the various edges that are created in the process. If one such edge has profile count of kind GUESSED_GLOBAL0, the compatibility check in the operator+ will lead to an ICE. After discussing the situation with Honza, we concluded that there is little more we can do other than check for this situation before touching the edge count, so this is what this patch does. gcc/ChangeLog: 2025-02-28 Martin Jambor <mjam...@suse.cz> PR ipa/118318 * ipa-cp.cc (adjust_clone_incoming_counts): Add a compatible_p check.