public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Mikael Morin <morin-mikael@orange.fr>
To: FX <fxcoudert@gmail.com>, fortran@gcc.gnu.org
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Fortran: make IEEE_VALUE produce signaling NaNs
Date: Sun, 16 Jan 2022 14:03:02 +0100	[thread overview]
Message-ID: <b0677042-307b-367d-bcfd-107a61f61c9b@orange.fr> (raw)
In-Reply-To: <32DB646C-7282-42B3-B4E4-9ED1FC563A85@gmail.com>

Hello,

Le 10/01/2022 à 18:32, FX via Fortran a écrit :
> Hi,
> 
> Second part of a three-patch series to fix PR 82207 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82207), making gfortran handle signaling NaNs. This part fixes the library code implementing IEEE_VALUE. To do so, I switched that part of library code from Fortran to C, because in C we have access to all GCC built-ins related to NaNs/infinities/etc, which is super useful for generating the right bit patterns (instead of using roundabout ways, like the previous Fortran implementation, for which I am guilty).
> 
> I needed to add to kinds.h the value of TINY for each floating-point (which is used to produce denormals, by halving TINY).
> 
> The patch comes with a testcase, which is still conditional on issignaling support at this stage (and therefore will run on glibc targets only).
> 
> I had to amend the gfortran.dg/ieee/ieee_10.f90 testcase, which produces signaling NaNs while -ffpe-trap=invalid is set. It passed before, but only by accident, because we were not actually generating signaling NaNs. I’m not sure what is the expected behaviour, but the patch does not affect the real behaviour.
> 
> Bootstrapped and regtested on x86_64-pc-gnu-linux. OK to commit?
> 
This looks good to me. Thanks.

  reply	other threads:[~2022-01-16 13:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-10 17:32 FX
2022-01-16 13:03 ` Mikael Morin [this message]
2022-01-16 22:02   ` FX
2022-01-16 23:04     ` FX

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b0677042-307b-367d-bcfd-107a61f61c9b@orange.fr \
    --to=morin-mikael@orange.fr \
    --cc=fortran@gcc.gnu.org \
    --cc=fxcoudert@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).