From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B619C3857B80; Thu, 6 Oct 2022 20:50:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B619C3857B80 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665089423; bh=To5WYIF/GXzbsgzZrBgrFxu1qpCHfIBoP0R7Btk5OrI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=tTXinhMh47ItQtapKKWPAFpQMKS6Zcnakq9FagxYNCxJpQuyPq1ppA+Fj+AIMkXig zpsjj08bRmqLcod0YOH1uHmwu0tQw7stLNILcOo4Or8PV1NFQhPoLAGk0vaJfd4TPB II2avx4GA2Ak7arCBsm2MK6mF7b5E6Gd+TD1+lI0= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/107176] [10/11/12/13 Regression] Wrong code at -Os on x86_64-pc-linux-gnu Date: Thu, 06 Oct 2022 20:50:22 +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: 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: 10.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: target_milestone component keywords cf_known_to_fail everconfirmed bug_status short_desc cf_reconfirmed_on cf_known_to_work 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=3D107176 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |10.5 Component|c |tree-optimization Keywords| |wrong-code Known to fail| |7.1.0 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Summary|Wrong code at -O0/-Os on |[10/11/12/13 Regression] |x86_64-pc-linux-gnu |Wrong code at -Os on | |x86_64-pc-linux-gnu Last reconfirmed| |2022-10-06 Known to work| |6.3.0 --- Comment #1 from Andrew Pinski --- Confirmed. Here is a better testcase: #include int a; long b; static inline long c(unsigned d) {=20 return d;=20 } static inline void e(int d) {=20 a =3D d;=20 } int main() { b =3D 0; for (; b < 1; b =3D c(b - 90) + 90 + 1) ; e(b >> 2); printf("%d\n", a); if (a !=3D 1073741824) __builtin_abort(); }=