From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8EDA13858CDA; Tue, 27 Sep 2022 09:39:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8EDA13858CDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1664271597; bh=WlTJ2KBUozQ5+tHTwjNaDDLzNVK14C0RnxqmIK3ofzs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=DU+vPatE8ACQLogrnWaba6FuVr45ulPilugJahV4hgOZsgkM+faSSr+NPnsWF7P10 28ucHNiqRp8+KjoD83oMrIaBQ0MwOn/oe+YfuAIE0et3ko9E4teNO8Kngtage/HTLL wPV6CK38hKYGF2d6iw0JvKEq+llRY5Ja09IhGNNs= From: "aldyh at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug testsuite/107046] [13 Regression] Recent FP range work causing inf-2 to be miscompiled on rx-elf Date: Tue, 27 Sep 2022 09:39:57 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: testsuite X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: testsuite-fail X-Bugzilla-Severity: normal X-Bugzilla-Who: aldyh at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 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=3D107046 --- Comment #4 from Aldy Hernandez --- (In reply to Richard Biener from comment #3) > Ah, probably the >=20 > void test(double f, double i) > { > ... > if (i !=3D __builtin_inf()) > abort (); >=20 > int main() > { > test (34.0, __builtin_inf()); > ... >=20 > test is "miscompiled", similar to what we see in povray. >=20 > We can probably gate parts of the testcase with >=20 > #if __FINITE_MATH_ONLY__ =3D=3D 0 Yeah, I saw that. Agreed that we should predicate parts of this testcase. Also, it seems weird that the gimple representation is inconsistent between= the conditional and the call site. Before einline we have: void test (double f, double i) { : if (i_1(D) <=3D 3.4028234663852885981170418348451692544e+38) goto ; [INV] else goto ; [INV] : abort (); : return; } int main () { : test (3.4e+1, Inf); } Which the inliner through some unknown mechanism (to me), folds to a call to abort in main. This is before evrp or ethread. I wonder how it folded that with. Anywho..that's neither here nor there. What I'm concerned is that INF is being expanded differently between test a= nd main. Shouldn't we at least be consistent?=