From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id ABB613858CDA; Tue, 10 Jan 2023 22:55:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ABB613858CDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1673391323; bh=/gzpGXChjESpJXb5QuxvuhDzcpOdnr6Dd39mrEtSeLU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=QNcWIGhmAdsdRs9ztgE8WdvGUiZp+kohjjCuNHGNh+F8foMWBANP/3w8rJdJyw/Cq 1t2lfChn7WXMpJl45s7IY5bkPiMfVsk19sl8P+DbmHePaHuvGxTfnAb0/XbBLdf1FS A+ic+w8Dx1IRKmRAn9NCCnZnttl5YZwTDYTJhT90= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/108365] [9/10/11/12/13 Regression] Wrong code with -O0 Date: Tue, 10 Jan 2023 22:55:23 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: diagnostic, 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: cf_reconfirmed_on cf_known_to_fail keywords cf_known_to_work bug_status everconfirmed 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=3D108365 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2023-01-10 Known to fail| |7.1.0, 8.1.0 Keywords| |diagnostic Known to work| |6.1.0, 6.4.0 Status|UNCONFIRMED |NEW Ever confirmed|0 |1 --- Comment #1 from Andrew Pinski --- A compile time testcase: constexpr char b[23] =3D {1}; long t =3D long((unsigned long)(-2147483647 - 1)) / long(b[0] ? -1 : 0); This should not warn with -std=3Dc++11 . Confirmed.=