From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D895C3858D3C; Mon, 17 Oct 2022 07:40:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D895C3858D3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665992454; bh=4GUB6Nu8XUWYUgTD2hkpPiC9tjgX5ACiLe0Yk0W8m1U=; h=From:To:Subject:Date:In-Reply-To:References:From; b=vgE42oDTl/8pjdOKChpN3UoIB61tlG6Uy3Ge8tcVv7iEynh0iTmI1GBjxZ3BZUl9a /+sxpBrUlaDuk5lj5BnwJ3aiZctbJT70aOLGnjY3sjj0pSlOalJgH2CRFuTCjPu7QR dDH0TlQDzWMPBhyV9k6hJkZbTpmIB8dqAz0MLgFc= From: "alex.curiou at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/107285] Incorrect code generation when we use __builtin_constant_p built-in function. Date: Mon, 17 Oct 2022 07:40:54 +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: 12.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: alex.curiou at gmail dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID 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=3D107285 --- Comment #2 from Alexey --- Well, currently The code generation is just could be wrong. If we use the example provided: we have to see or 13 or 60 in both cases. We have to see same result from bar function and from the final result of t= he program calculation. But here the code is generated to calculate 60, but it returns 13 ???? !!!!=