From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9D7D43858CDB; Fri, 31 Mar 2023 13:23:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9D7D43858CDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1680269000; bh=Rgx2NbK8WCqOik29bmysKjba4jmzSwJI5dir/1UjvSg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Vm2AS90ANNB9cIuCkcQ2CIL+724R7GVQ6hfBn9rwcX7Nlk2/vZiGkWUEBXe/HWRjg WYhga+4ndp0CTZkub7X4coFkl0gnARi/FJWQ57gtOFqc/9DA20ZjlAI212XDwuU6Lb DtooDetrVIKxUiyh6aKRiaKxLzov6C9Da9HzBqug= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109359] [12/13 Regression] Compile-time rounding of double literal to float is incorrect with -frounding-math Date: Fri, 31 Mar 2023 13:23:20 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: needs-bisection, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth 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: 12.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: everconfirmed cf_reconfirmed_on target_milestone short_desc keywords bug_status 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=3D109359 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Last reconfirmed| |2023-03-31 Target Milestone|--- |12.3 Summary|Compile-time rounding of |[12/13 Regression] |double literal to float is |Compile-time rounding of |incorrect with |double literal to float is |-frounding-math |incorrect with | |-frounding-math Keywords| |needs-bisection, wrong-code Status|UNCONFIRMED |NEW --- Comment #1 from Richard Biener --- With -frounding-math: xs: .long -639366012 .long 1063214053 .long 536561674 .long 1071918432 without: xs: .long 989519663 .long 1059154689 it looks like we fail to convert the double constant to single precision and then end up outputting the double precision constants ... The C frontend works.=