From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1245D3853561; Thu, 1 Sep 2022 07:09:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1245D3853561 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1662016191; bh=CNBtzITD0ADWZTsLx7lZPO3DjDSxJYANl0JPQaTA1PI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=obnIr15aQfLXP/QzYAnRmh12EKuJsVo1a0mPR7iX+00K4Ulp1YbX2RklB/CKv9qk3 YVdqJ2iiW0K+Z2NVNk56ZMRBA9l80bAznYK7xn1O92fRlu2oTnwgntve8Qv0J8eADS tjp4KPf7/ft09frr7Dj2wRJcNGnbOkGVKF+kXPmI= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/106785] ICE in fail, at selftest.cc:47 since r13-2266-g8bb1df032cc080 Date: Thu, 01 Sep 2022 07:09:50 +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: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: aldyh at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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=3D106785 --- Comment #9 from CVS Commits --- The master branch has been updated by Aldy Hernandez : https://gcc.gnu.org/g:bdfe0d1ce0aebdb68b77e2c04a0f45956c56b449 commit r13-2334-gbdfe0d1ce0aebdb68b77e2c04a0f45956c56b449 Author: Aldy Hernandez Date: Wed Aug 31 14:31:12 2022 +0200 Make frange selftests work on !HONOR_NANS systems. I'm just shuffling the FP self tests here, with no change to existing functionality. If we agree that explicit NANs in the source code with !HONOR_NANS should behave any differently, I'm happy to address whatever needs fixing, but for now I'd like to unblock the !HONOR_NANS build systems. I have added an adaptation of a test Jakub suggested we handle in the P= R: void funk(int cond) { float x; if (cond) x =3D __builtin_nan (""); else x =3D 1.24; bar(x); } For !HONOR_NANS, the range for the PHI of x_1 is the union of 1.24 and NAN which is really 1.24 with a maybe NAN. This reflects the IL-- the presence of the actual NAN. However, VRP will propagate this because it sees the 1.24 and ignores the possibility of a NAN, per !HONOR_NANS. IMO, this is correct. OTOH, for HONOR_NANS the unknown NAN property keeps us from propagating the value. Is there a reason we don't warn for calls to __builtin_nan when !HONOR_NANS? That makes no sense to me. PR tree-optimization/106785 gcc/ChangeLog: * value-range.cc (range_tests_nan): Adjust tests for !HONOR_NAN= S. (range_tests_floats): Same. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/vrp-float-nan-1.c: New test.=