From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EE2AA3858C62; Thu, 9 Feb 2023 17:26:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EE2AA3858C62 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675963589; bh=aPrfgfy0BHmtpr82horKTrU0qsffPDwnuN4Hm7P93nE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=VFpJbOiWwcCzkt5T9XB2nbn140bqkJ/N2KD+7SrZyOobo7KfZO5EM2bH4N85WMBJq kiYru03qB3HHFy9cw+56f4c2iCxoVpvjNW2tSKwEH3i+BlIKH8S3K4GiqIbxh6QQVD YQDIfUY9vCITLqdKM5yHjv/uHpxjra9ejqJNdGwA= From: "joseph at codesourcery dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/108742] Incorrect constant folding with (or exposed by) -fexcess-precision=standard Date: Thu, 09 Feb 2023 17:26:29 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 12.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: joseph at codesourcery dot com 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: --- 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=3D108742 --- Comment #11 from joseph at codesourcery dot com --- As discussed, FLT_EVAL_METHOD applies to constants as well as to=20 operations. See the example in C17 F.8.5, for example; it shows float y =3D 1.1e75f; // may raise exceptions since 1.1e75f may be evaluated to a wider range and precision than those=20 of float, in which case the conversion to the range and precision of float= =20 occurs at runtime (whereas if there is no excess range and precision for=20 float, the constant is evaluated to positive infinity of type float at=20 translation time).=