From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A26663875463; Thu, 5 Oct 2023 16:14:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A26663875463 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1696522493; bh=SZC8wgYtlCX6wxSV4p0mrUHTL2NCIRTf+fScmLYISN8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=A+X5/wz48A4s1ZBuFRygKv2QSXplFqfVJUaxXcNzl0B443ouiyh8QYZyG9EHO4zOb MCgECa4BIIbWULUOcYToM2QpGFO8FslxLa7Vd+py+YQDujxkwiL9Y6pAziLibft1Ze c2tAPmDiN/OpuxOz6++7MZrNSI22s5BC9rBKDbcE= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug gcov-profile/111559] [14 regression] ICE when building Python with PGO Date: Thu, 05 Oct 2023 16:14:51 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: gcov-profile X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: ice-checking, ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D111559 --- Comment #9 from CVS Commits --- The master branch has been updated by Sergei Trofimovich : https://gcc.gnu.org/g:043a6fcbc27f8721301eb2f72a7839f54f393003 commit r14-4421-g043a6fcbc27f8721301eb2f72a7839f54f393003 Author: Sergei Trofimovich Date: Wed Sep 27 14:29:12 2023 +0100 ipa-utils: avoid uninitialized probabilities on ICF [PR111559] r14-3459-g0c78240fd7d519 "Check that passes do not forget to define profile" exposed check failures in cases when gcc produces uninitialized profile probabilities. In case of PR/111559 uninitialized profile is generated by edges executed 0 times reported by IPA profile: $ gcc -O2 -fprofile-generate pr111559.c -o b -fopt-info $ ./b $ gcc -O2 -fprofile-use -fprofile-correction pr111559.c -o b -fopt-= info pr111559.c: In function 'rule1': pr111559.c:6:13: error: probability of edge 3->4 not initialized 6 | static void rule1(void) { if (p) edge(); } | ^~~~~ during GIMPLE pass: fixup_cfg pr111559.c:6:13: internal compiler error: verify_flow_info failed The change conservatively ignores updates with zero execution counts and uses initially assigned probabilities (`always` probability in case of the example). PR ipa/111283 PR gcov-profile/111559 gcc/ * ipa-utils.cc (ipa_merge_profiles): Avoid producing uninitialized probabilities when merging counters with zero denominators. gcc/testsuite/ * gcc.dg/tree-prof/pr111559.c: New test.=