From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C2CD13858C3A; Thu, 9 Feb 2023 16:10:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C2CD13858C3A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675959030; bh=4yBm3g0xF9+7Cr/BzfZqSd+HDDWvH7PEQ0ZXrS3cFsE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=AGcPCQJfVnojud21fybsnWYegHKGYlBs79kvxLwVa8BpfFeHEEU0oAc78HSPFusx7 fhqRb78cYVGeY6LRUhoeSdGyF2EUP3moNCYlQ3zTFkhucaVn+KlT7jFXjpVXgzSYCD ewO2yIm0ORs28/DbFqwIIwKXode+3suQGvhLY4Co= From: "jakub at gcc dot gnu.org" 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 16:10:30 +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: jakub 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: --- 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 #2 from Jakub Jelinek --- Note, internally in standard excess precision, 4.2 seen by the lexer is actually EXCESS_PRECISION , when it is assigned to a double variable or cast to double (i.e. in places where C/C++ require the excess precision to be converted to the narrower one) it is rounded to double, but when used as (l= ong double)4.2 it is the same as 4.2L and even (long double)d =3D=3D (long double)4.2 should beh= ave the same as (long double)d =3D=3D 4.2 and d =3D=3D 4.2.=