From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 975B2385E45C; Mon, 3 Jun 2024 13:59:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 975B2385E45C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1717423143; bh=KhyymYa4+u9zweWSk1HITOtJ/Rc9V9y6X6cnVQkgsg8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=MYSY2PFE7Xq43d/Q43KuM5nHYZR3KgAj6hq8/Hud42faKvVsi8ljDJVxwFFyqPhHk V92mOvZX/N99Adl1dBVOS0+aZyEAxE1Jl+EihstXcRyYwzx+HaqWjROAofsox8G25O XiwFMqbAR+3l99s2XLeLqbV+FLRwhf/EFJCf01rk= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/108789] __builtin_(add|mul|sub)_overflow methods generate duplicate operations if both operands are const which in turn causes wrong code due to overlapping arguments Date: Mon, 03 Jun 2024 13:59:03 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 12.2.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia 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=3D108789 --- Comment #4 from Andrew Pinski --- Note the missing SAVE_EXPR issue is similar to PR 52339 (which has a patch attached to it that would fix the issue here too I think).=