From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 985DB3858409; Thu, 30 Dec 2021 17:15:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 985DB3858409 From: "fxcoudert at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/95644] [F2018] IEEE_FMA is missing from the IEEE_ARITHMETIC module Date: Thu, 30 Dec 2021 17:15:45 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 9.3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: fxcoudert at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: fxcoudert at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created 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: Thu, 30 Dec 2021 17:15:45 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95644 --- Comment #15 from Francois-Xavier Coudert = --- Created attachment 52094 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D52094&action=3Dedit Tentative patch, adding IEEE_FMA and IEEE_SIGNBIT I am attaching a tentative patch for the issue. I also added IEEE_SIGNBIT w= hile I was at it, since it was relatively simple. Other new IEEE functions in Fortran 2018 will be more work. The patch converts calls to IEEE_FMA and IEEE_SIGNBIT to the GCC builtins of the same name. For IEEE_FMA, it also works with _Float128, and there it will generate calls to the fmaq() function in libquadmath. It generates the right code on simple examples, but I would welcome example= s of test programs that check the output of both IEEE_SIGNBIT and IEEE_FMA on "interesting" cases.=