From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6BE48385829B; Mon, 5 Feb 2024 16:11:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6BE48385829B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1707149518; bh=k2XBoFBlLGrx+wDKER2L4lPSlRhnPcAGt4lNgRzzVgs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=C1yoysDSiX3vdnwYA7gyDld3LjdSfLuRmyqA86wwVmOBDOpJH26ElVZdQu36OCK1Q 4SDGge106TVI+d7jV9iybX0Y/QsbiEAX2i3KE2DwcaUFCzbWqie9u+E4PYlG/lS4y1 0nhmP5//rGqqZChbFU6SQ7TXV7KrKvMWBqQwNDws= From: "andi-gcc at firstfloor dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug gcov-profile/113765] ICE: autofdo: val-profiler-threads-1.c compilation, error: probability of edge from entry block not initialized Date: Mon, 05 Feb 2024 16:11:58 +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 X-Bugzilla-Severity: normal X-Bugzilla-Who: andi-gcc at firstfloor dot 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: --- 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=3D113765 --- Comment #3 from Andi Kleen --- -O1 fixes it, so an easy patch would be=20 diff --git a/gcc/auto-profile.cc b/gcc/auto-profile.cc index 63d0c3dc36df..180ed7a8260f 100644 --- a/gcc/auto-profile.cc +++ b/gcc/auto-profile.cc @@ -1758,7 +1758,7 @@ public: bool gate (function *) final override { - return flag_auto_profile; + return flag_auto_profile && optimize > 0; } unsigned int execute (function *) final override=