public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/82207] ieee_class identifies signaling NaNs as quiet NaNs
[not found] <bug-82207-4@http.gcc.gnu.org/bugzilla/>
@ 2021-12-29 14:26 ` fxcoudert at gcc dot gnu.org
2021-12-31 16:57 ` fxcoudert at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 6+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2021-12-29 14:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82207
Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fxcoudert at gcc dot gnu.org
Assignee|unassigned at gcc dot gnu.org |fxcoudert at gcc dot gnu.org
--- Comment #13 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
Let's have a try at fixing this.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/82207] ieee_class identifies signaling NaNs as quiet NaNs
[not found] <bug-82207-4@http.gcc.gnu.org/bugzilla/>
2021-12-29 14:26 ` [Bug fortran/82207] ieee_class identifies signaling NaNs as quiet NaNs fxcoudert at gcc dot gnu.org
@ 2021-12-31 16:57 ` fxcoudert at gcc dot gnu.org
2021-12-31 18:31 ` fxcoudert at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 6+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2021-12-31 16:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82207
--- Comment #14 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
Created attachment 52101
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52101&action=edit
First attempt at a patch
This is a first version of a patch for support of signalling NaNs. What it
does:
- In the code implementing IEEE_CLASS, use the target issignaling macro (from
TS 18661-1:2014) to check whether a NaN is signalling.
- Sadly, very few targets implement this (I think only glibc targets,
currently). This means we will have to provide fallback implementations. A
first attempt at fallback implementations is included in the patch, but has not
been tested thoroughly. It will require testing on many platforms to be
validated.
- I moved the library implementation of IEEE_VALUE from Fortran to C code,
which gives us access to GCC's built-in functions for NaN generation (both
quiet and signalling).
What remains to be done:
- Write testcases that exercise the different aspects of these functions
- Figure out a weird behaviour for __builtin_nanq() in C code:
https://gcc.gnu.org/pipermail/gcc/2021-December/237976.html
- More testcases :)
- Testing the behaviour on different targets
Help would be appreciated in finding good testcases.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/82207] ieee_class identifies signaling NaNs as quiet NaNs
[not found] <bug-82207-4@http.gcc.gnu.org/bugzilla/>
2021-12-29 14:26 ` [Bug fortran/82207] ieee_class identifies signaling NaNs as quiet NaNs fxcoudert at gcc dot gnu.org
2021-12-31 16:57 ` fxcoudert at gcc dot gnu.org
@ 2021-12-31 18:31 ` fxcoudert at gcc dot gnu.org
2022-01-10 11:31 ` fxcoudert at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 6+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2021-12-31 18:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82207
Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #52101|0 |1
is obsolete| |
--- Comment #15 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
Created attachment 52103
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52103&action=edit
Patch, v2
Updated patch, passing -fsignaling-nans to the build machinery for IEEE-related
runtime files. This fixes the __builtin_nans() issue, and is good practice in
any case.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/82207] ieee_class identifies signaling NaNs as quiet NaNs
[not found] <bug-82207-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2021-12-31 18:31 ` fxcoudert at gcc dot gnu.org
@ 2022-01-10 11:31 ` fxcoudert at gcc dot gnu.org
2022-01-10 11:31 ` fxcoudert at gcc dot gnu.org
2022-01-26 15:25 ` fxcoudert at gcc dot gnu.org
5 siblings, 0 replies; 6+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2022-01-10 11:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82207
--- Comment #16 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
Part 1/3 committed: IEEE_CLASS now recognises signaling NaNs on targets that
provide the issignaling macro (from TS 18661-1:2014).
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=492954263e39346287a5a2a32bcc5312466a0ee1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/82207] ieee_class identifies signaling NaNs as quiet NaNs
[not found] <bug-82207-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2022-01-10 11:31 ` fxcoudert at gcc dot gnu.org
@ 2022-01-10 11:31 ` fxcoudert at gcc dot gnu.org
2022-01-26 15:25 ` fxcoudert at gcc dot gnu.org
5 siblings, 0 replies; 6+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2022-01-10 11:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82207
Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |12.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/82207] ieee_class identifies signaling NaNs as quiet NaNs
[not found] <bug-82207-4@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2022-01-10 11:31 ` fxcoudert at gcc dot gnu.org
@ 2022-01-26 15:25 ` fxcoudert at gcc dot gnu.org
5 siblings, 0 replies; 6+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2022-01-26 15:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82207
Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #17 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
This is fixed in trunk (will become GCC 12).
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-01-26 15:25 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-82207-4@http.gcc.gnu.org/bugzilla/>
2021-12-29 14:26 ` [Bug fortran/82207] ieee_class identifies signaling NaNs as quiet NaNs fxcoudert at gcc dot gnu.org
2021-12-31 16:57 ` fxcoudert at gcc dot gnu.org
2021-12-31 18:31 ` fxcoudert at gcc dot gnu.org
2022-01-10 11:31 ` fxcoudert at gcc dot gnu.org
2022-01-10 11:31 ` fxcoudert at gcc dot gnu.org
2022-01-26 15:25 ` fxcoudert at gcc dot gnu.org
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).