From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DCB553858C27; Tue, 2 Nov 2021 22:41:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DCB553858C27 From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/103052] [9/10/11/12 Regression] Function call omitted at -O1 optimization level. Date: Tue, 02 Nov 2021 22:41:44 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 10.3.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: 9.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cf_known_to_fail 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Nov 2021 22:41:45 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103052 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Known to fail| |10.3.0, 11.2.0 --- Comment #6 from Andrew Pinski --- A better self-contained testcase, using builtins: static void js_error(void); static int top; static void js_throw(void) { __builtin_exit(0); } // LOCATION A -- if js_pop is here, the bug is present static void js_pop(void) { if (++top > 100) js_error(); } static void jsC_error(const char *v) { if (v[0] =3D=3D 0) js_error(); js_throw(); } static void checkfutureword(const char *exp) { if (!__builtin_strcmp(exp, "const")) jsC_error("boom"); } static void js_error(void) { checkfutureword("foo"); checkfutureword("bar"); js_pop(); } int main(void) { checkfutureword("const"); __builtin_abort (); }=