From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id ADE43393743C; Tue, 10 Mar 2020 09:47:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ADE43393743C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1583833677; bh=GSiSGuZPGuORIaVfzvl3yRY7corYQ4s9pMlf2nugk8c=; h=From:To:Subject:Date:In-Reply-To:References:From; b=JIdBuZOx724YI20b7UXz279pPbA8/joPqhQ5LX2yX4bbOWB5mt+TisSHNhwGyysIj FyYMLZVUCNDaZCMJSqI4mYlywI7UrNEksYYJsvxBkCx+ECT4LolRKXOEIwYI4jW6bS q8v60JSmdX0uGy2LG2aOouqd68UUD914cUGrHEic= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/94111] Wrong constant folding: decimal floating-point infinity casted to double -> zero Date: Tue, 10 Mar 2020 09:47:57 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: 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: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cc keywords cf_reconfirmed_on everconfirmed short_desc 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Mar 2020 09:47:57 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94111 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW CC| |rguenth at gcc dot gnu.org Keywords| |wrong-code Last reconfirmed| |2020-03-10 Ever confirmed|0 |1 Summary|Wrong optimization: decimal |Wrong constant folding: |floating-point infinity |decimal floating-point |casted to double -> zero |infinity casted to double | |-> zero --- Comment #1 from Richard Biener --- This goes wrong somewhere in constant folding: d.1_2 =3D d_13; _3 =3D (double) d.1_2; -> d.1_2 =3D Inf; _3 =3D 0.0; so (double) Inf is computed wrong.=