From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CB5BD3858D3C; Thu, 26 Jan 2023 14:29:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CB5BD3858D3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1674743363; bh=8NlMwth+htOtF5uH97XZvA5zU3JGbKjLjblCvOg9Tjw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=g98c4ntS6eSt/3eYPwdByX/WPxFzWYstP1vkbnm7STx6tzfmmRnYDOx64A5RmKlfM EnNA59KXvLAP3/DNEWVbcyh+pcvfO4r4R4NLD3PKnVI0ufpl/ARjMKVnQ8QpW/Jtvh AoFjv+gGU3rZSlTepjU6gUWJoSxDlzYct2n/7HWA= From: "xry111 at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/107608] [13 Regression] Failure on fold-overflow-1.c and pr95115.c Date: Thu, 26 Jan 2023 14:29:21 +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: missed-optimization, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: xry111 at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 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=3D107608 --- Comment #44 from Xi Ruoyao --- (In reply to rguenther@suse.de from comment #43) > On Thu, 19 Jan 2023, xry111 at gcc dot gnu.org wrote: >=20 > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107608 > >=20 > > --- Comment #42 from Xi Ruoyao --- > > (In reply to Richard Biener from comment #41) > > > We could fix the testcase with > > >=20 > > > diff --git a/gcc/testsuite/gcc.dg/pr95115.c b/gcc/testsuite/gcc.dg/pr= 95115.c > > > index 69c4f83250c..09273e445d2 100644 > > > --- a/gcc/testsuite/gcc.dg/pr95115.c > > > +++ b/gcc/testsuite/gcc.dg/pr95115.c > > > @@ -17,6 +17,7 @@ int > > > main (void) > > > { > > > double r =3D x (); > > > + volatile double rr =3D r; > > > if (!__builtin_isnan (r)) > > > abort (); > > > if (!fetestexcept (FE_INVALID)) > > >=20 > > > that preserves optimizing the isnan check but also preserves the comp= utation > > > and checks the non-propagation of a NaN. > >=20 > > Hmm, so it means we cannot rely on Inf / Inf to raise an exception? Th= en we > > need to fix Glibc... >=20 > If the result is unused then no, GCC will happily elide exceptions from > unused computations like Inexact from the statement >=20 > 1./3.; >=20 > but this has been done before. What's new is that GCC can now elide > some uses (in this case the isnan check is the only use) The should we just change PR95115 to "INVALID" and remove the test case, and fix any regression on Glibc side?=