From: FX <fxcoudert@gmail.com>
To: Steve Kargl <sgk@troutmask.apl.washington.edu>
Cc: fortran@gcc.gnu.org
Subject: Re: New signaling NaN causes 12 testsuite failures
Date: Tue, 25 Jan 2022 21:56:05 +0100 [thread overview]
Message-ID: <F21D5093-1F8B-40BE-8748-96E3C4F88E58@gmail.com> (raw)
In-Reply-To: <20220125204544.GE69322@troutmask.apl.washington.edu>
[-- Attachment #1: Type: text/plain, Size: 460 bytes --]
> Found it. https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html
>
> Add trailing undersores to __FLOAT_WORD_ORDER and change
> __BIG_ENDIAN to __ORDER_BIG_ENDIAN__. Likewise for LITTLE.
Thanks Steve!
What I wonder is: if those conditions failed, then the struct they define should have been empty, and therefore the code shouldn’t compile anyway (that was the intent).
Does the attached patch fix the remaining failures?
FX
[-- Attachment #2: fix.txt --]
[-- Type: text/plain, Size: 1709 bytes --]
commit 03cfe155f46c05e4dda349be2abe467c16789491
Author: Francois-Xavier Coudert <fxcoudert@gmail.com>
Date: 2022-01-25 21:54:03 +0100
Fortran: fix issignaling() implementation
libgfortran/ChangeLog:
* ieee/issignaling_fallback.h: Fix GCC-specific preprocessor
macros.
diff --git a/libgfortran/ieee/issignaling_fallback.h b/libgfortran/ieee/issignaling_fallback.h
index 4632bc510f7..fc59481c43b 100644
--- a/libgfortran/ieee/issignaling_fallback.h
+++ b/libgfortran/ieee/issignaling_fallback.h
@@ -103,12 +103,12 @@ typedef union
long double value;
struct
{
-#if __FLOAT_WORD_ORDER == __BIG_ENDIAN
+#if __FLOAT_WORD_ORDER__ == __ORDER_BIG_ENDIAN__
int sign_exponent:16;
unsigned int empty:16;
uint32_t msw;
uint32_t lsw;
-#elif __FLOAT_WORD_ORDER == __LITTLE_ENDIAN
+#elif __FLOAT_WORD_ORDER__ == __ORDER_LITTLE_ENDIAN__
uint32_t lsw;
uint32_t msw;
int sign_exponent:16;
@@ -146,10 +146,10 @@ typedef union
long double value;
struct
{
-#if __FLOAT_WORD_ORDER == __BIG_ENDIAN
+#if __FLOAT_WORD_ORDER__ == __ORDER_BIG_ENDIAN__
uint64_t msw;
uint64_t lsw;
-#elif __FLOAT_WORD_ORDER == __LITTLE_ENDIAN
+#elif __FLOAT_WORD_ORDER__ == __ORDER_LITTLE_ENDIAN__
uint64_t lsw;
uint64_t msw;
#endif
@@ -191,10 +191,10 @@ typedef union
__float128 value;
struct
{
-#if __FLOAT_WORD_ORDER == __BIG_ENDIAN
+#if __FLOAT_WORD_ORDER__ == __ORDER_BIG_ENDIAN__
uint64_t msw;
uint64_t lsw;
-#elif __FLOAT_WORD_ORDER == __LITTLE_ENDIAN
+#elif __FLOAT_WORD_ORDER__ == __ORDER_LITTLE_ENDIAN__
uint64_t lsw;
uint64_t msw;
#endif
next prev parent reply other threads:[~2022-01-25 20:56 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-25 0:44 Steve Kargl
2022-01-25 2:48 ` Steve Kargl
2022-01-25 8:05 ` FX
2022-01-25 17:42 ` Steve Kargl
2022-01-25 19:59 ` Steve Kargl
2022-01-25 20:04 ` FX
2022-01-25 20:20 ` Steve Kargl
2022-01-25 8:09 ` FX
2022-01-25 16:52 ` Steve Kargl
2022-01-25 19:35 ` Steve Kargl
2022-01-25 19:52 ` FX
2022-01-25 20:12 ` Steve Kargl
2022-01-25 20:45 ` Steve Kargl
2022-01-25 20:56 ` FX [this message]
2022-01-25 21:05 ` Steve Kargl
2022-01-25 23:11 ` FX
2022-01-26 10:47 ` Tobias Burnus
2022-01-26 16:02 ` Steve Kargl
2022-01-26 16:19 ` 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=F21D5093-1F8B-40BE-8748-96E3C4F88E58@gmail.com \
--to=fxcoudert@gmail.com \
--cc=fortran@gcc.gnu.org \
--cc=sgk@troutmask.apl.washington.edu \
/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).