From: Thomas Koenig <tkoenig@netcologne.de>
To: sgk@troutmask.apl.washington.edu
Cc: Harald Anlauf via Fortran <fortran@gcc.gnu.org>,
FX Coudert <fxcoudert@gmail.com>,
gcc-patches@gcc.gnu.org,
Michael Meissner <meissner@linux.ibm.com>
Subject: Re: [PATCH] Fortran: add Fortran 2018 IEEE_{MIN,MAX} functions
Date: Thu, 8 Jun 2023 20:17:48 +0200 [thread overview]
Message-ID: <cc240541-d8c3-844f-3795-3b48f3f15ec1@netcologne.de> (raw)
In-Reply-To: <ZIICdIfm+h/H4YEf@troutmask.apl.washington.edu>
Hi Steve,
> On Thu, Jun 08, 2023 at 12:17:02PM +0200, Thomas Koenig wrote:
[...]
> Thanks for the explanation. As I likely will not use a POWER-based
> system, I only loosely followed the discussion. I don't remember
> if ibm double-double is REAL(16) or REAL(17). If ieee 128-bit is
> REAL(16), then everything should (I believe) be okay.
From a user standpoint, REAL(16) is always used. We only use the 17
as a marker in the library, and to be able to have library versions
of IBM long double co-reside with IEEE long double.
>> There is a virutal POWER machine at OSUL dedicated to the IEEE QP
>> gfortran effort. It hasn't been used for some time, but it's still
>> active. I just bootstrapped trunk there and ran all the IEEE from the
>> testsuite manually, with
>>
>> $ for a in *.f90; do echo "Testing $a"; gfortran -o $a.exe -fno-range-check
>> -mcpu=power9 -mabi=ieeelongdouble -static-libgfortran $a signaling_1_c.c
>> signaling_2_c.c ; ./$a.exe ; done 2>&1 | grep -v command-line
>> Testing fma_1.f90
>
> These could be misleading. gfortran has pre-processor tokens
> for REAL(10) and REAL(16). If __GFC_REAL_16__ isn't defined
> the ieee testing is skipped.
Hmm... need to check. With the recently-built compiler:
$ cat tst.F90
program memain
#if __GFC_REAL_16__
print *,"__GFC_REAL_16 found"
#endif
#if __GFC_REAL_17__
print *,"__GFC_REAL_17 found"
#endif
print *,"digits is ",digits(1._16)
end program memain
$ gfortran -static-libgfortran tst.F90 && ./a.out
__GFC_REAL_16 found
digits is 106
$ gfortran -static-libgfortran -mabi=ieeelongdouble -mcpu=power9 tst.F90
&& ./a.out
__GFC_REAL_16 found
digits is 113
Looks clean.
[...]
> Should we have a __GFC_REAL_17__?
I don't think we need it - REAL(KIND=17) is not supported in
the compiler (we discussed and rejected that), and people
who mix IBM long double and IEEE long double will have no
joy with their programs; they need to recompile everything.
But we may have to do something about the files in the
thelibgfortran/ieee subdirectory.
Best regards
Thomas
next prev parent reply other threads:[~2023-06-08 18:17 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-06 13:19 FX
2023-06-06 15:43 ` Steve Kargl
2023-06-06 15:51 ` Steve Kargl
2023-06-06 18:21 ` Steve Kargl
2023-06-06 19:00 ` Harald Anlauf
2023-06-06 19:11 ` FX Coudert
2023-06-07 18:31 ` Harald Anlauf
2023-06-07 18:50 ` Steve Kargl
2023-06-08 10:17 ` Thomas Koenig
2023-06-08 10:21 ` FX Coudert
2023-06-08 11:24 ` Thomas Koenig
2023-06-08 16:31 ` Steve Kargl
2023-06-08 18:17 ` Thomas Koenig [this message]
2023-06-10 15:24 ` FX Coudert
2023-06-11 9:50 ` Thomas Koenig
2023-06-11 13:43 ` FX Coudert
2023-06-06 19:35 ` FX Coudert
2023-06-07 3:15 ` Steve Kargl
2023-06-10 15:42 ` FX Coudert
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=cc240541-d8c3-844f-3795-3b48f3f15ec1@netcologne.de \
--to=tkoenig@netcologne.de \
--cc=fortran@gcc.gnu.org \
--cc=fxcoudert@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=meissner@linux.ibm.com \
--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).