From: Steve Kargl <sgk@troutmask.apl.washington.edu>
To: FX <fxcoudert@gmail.com>
Cc: fortran@gcc.gnu.org
Subject: Re: New signaling NaN causes 12 testsuite failures
Date: Tue, 25 Jan 2022 09:42:04 -0800 [thread overview]
Message-ID: <20220125174204.GA74530@troutmask.apl.washington.edu> (raw)
In-Reply-To: <93B4F458-9AD2-44DA-9F21-37B16C4A0CE8@gmail.com>
On Tue, Jan 25, 2022 at 09:05:55AM +0100, FX wrote:
> Hi Steve,
>
> > New signaling NaN causes 12 testsuite failures
>
> Thanks for alerting me.
>
> > Line 42 of signal_1.f90 looks wrong unless the
> > line is testing conversion on assignment. Should
> > y be x?
>
> Indeed. Fixed: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=c0a4a658097c56fa03d04b8d15c3ea02961d62a4
>
Thanks.
> > Got the following in testsuite/gfortran/gfortran.log
> >
> > NaN 7FFFA000000000000000
> > NaN 7FFFC000000000000000
> > NaN 7FFFA000000000000000
> >
> > and with "stop 300" commented out everything passes. Now to
> > chase down hex representations for sNaN and qNaN. Suspect
> > ieee_class() is broken.
>
> How does the long double formation look like on x86_64-unknown-freebsd?
Ugh. I'm afraid that this might be a mess.
> That test passes on x86_64 for linux and darwin, so I’m wondering
> what’s different about freebsd…
>
> Can you tell me whether the C front-end defines __LDBL_IS_IEC_60559__?
> What is the value of __LDBL_DIG__? __DBL_DIG__?
> __FLOAT_WORD_ORDER == __BIG_ENDIAN or __LITTLE_ENDIAN?
>
% cat a.c
#include <stdio.h>
int
main(void)
{
#ifdef __LDBL_IS_IEC_60559__
printf("__LDBL_IS_IEC_60559__? yes\n");
#else
printf("__LDBL_IS_IEC_60559__? no\n");
#endif
return 0;
};
% gcc11 -o z a.c && ./z <-- initial bootstrap compiler
__LDBL_IS_IEC_60559__? yes
% cc -o z a.c && ./z <-- clang/llvm FreeBSD system compiler
__LDBL_IS_IEC_60559__? no
% ~/work/x/bin/gcc -o z a.c && ./z <-- gcc build from origin/master
__LDBL_IS_IEC_60559__? yes
There might be some strange interaction between FreeBSD native
toolchain binaries and the binaries I build duringi bootstrap.
The LDBL info from /usr/include/x86/float is
#define LDBL_MANT_DIG 64
#define LDBL_EPSILON 1.0842021724855044340E-19L
#define LDBL_DIG 18
#define LDBL_MIN_EXP (-16381)
#define LDBL_MIN 3.3621031431120935063E-4932L
#define LDBL_MIN_10_EXP (-4931)
#define LDBL_MAX_EXP 16384
#define LDBL_MAX 1.1897314953572317650E+4932L
#define LDBL_MAX_10_EXP 4932
#if __ISO_C_VISIBLE >= 2011
#define LDBL_TRUE_MIN 3.6451995318824746025E-4951L
#define LDBL_DECIMAL_DIG 21
#define LDBL_HAS_SUBNORM 1
#endif /* __ISO_C_VISIBLE >= 2011 */
which is what I expect. How this maps to the __LDBL_DIG__
info, I do not know.
% grep -R __LDBL_DIG__ /usr/include
/usr/include/c++/v1/limits: static _LIBCPP_CONSTEXPR const int digits10 = __LDBL_DIG__;
% grep -R __FLOAT_WORD_ORDER /usr/include
Returns no hits, but I see
% grep -R __BIG_ENDIAN /usr/include
/usr/include/c++/v1/__config:#ifdef __BIG_ENDIAN__
/usr/include/c++/v1/__config:# if __BIG_ENDIAN__
/usr/include/c++/v1/__config:# endif // __BIG_ENDIAN__
/usr/include/c++/v1/__config:#endif // __BIG_ENDIAN__
/usr/include/c++/v1/__config:# elif __BYTE_ORDER == __BIG_ENDIAN
/usr/include/c++/v1/__config:# else // __BYTE_ORDER == __BIG_ENDIAN
So, maybe __BYTE_ORDER instead of __FLOAT_WORD_ORDER?
--
Steve
next prev parent reply other threads:[~2022-01-25 17:42 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 [this message]
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
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=20220125174204.GA74530@troutmask.apl.washington.edu \
--to=sgk@troutmask.apl.washington.edu \
--cc=fortran@gcc.gnu.org \
--cc=fxcoudert@gmail.com \
/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).