From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 423A13858D38; Fri, 9 Sep 2022 08:31:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 423A13858D38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1662712290; bh=0t1j/fbYWO8vtudOmIbIoxuOnYhbRjy0tU/me/qEyKY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=pwt9hqmo5tEt6OTQKz+1PBxf8+7kN4oad6GBziadwmujBXjS2zoFMhsIDL9SS9fRy +97QHbSuoAhMhQoeuDhvpmGrj5Dabps+7pmbVwAIcJd4oi0zeDvgHIQWjZ9ZtiyFNT L9qEyL770IdHsNXDIuWNXqM3eXKTdVIciN6pmQPQ= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/106892] [11/12/13 Regression] Wrong code at -O3 on x86_64-linux-gnu since r11-963-g80d6f89e78fc3b77 Date: Fri, 09 Sep 2022 08:31:30 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW 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=3D106892 --- Comment #7 from Richard Biener --- So the inline just has the return undefined in the unreachable path. We can make the inlined functions static (cleans up post-IPA dumps) and disable IPA for j: int a, b, c, d, e; int f[8]; static int g() { while (a) a >>=3D 4; return 0; } static int h(int i) { if (i >=3D '0') return i - '0'; //__builtin_unreachable (); } void __attribute__((noipa)) j(int i) { for (b =3D 2; g() <=3D 7; b++) if (i) { for (; e <=3D 7; e++) for (c =3D 1; c <=3D 7; c++) { d =3D h(b + '0'); f[-d + 4] ^=3D 3; } return; } } int main() { j(1); if (f[2] !=3D 0) __builtin_abort (); }=