From: Sandra Loosemore <sandra@codesourcery.com>
To: Tobias Burnus <tobias@codesourcery.com>,
Christophe Lyon <christophe.lyon.oss@gmail.com>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
"fortran@gcc.gnu.org" <fortran@gcc.gnu.org>,
"Thomas Koenig" <tkoenig@netcologne.de>,
"José Rui Faustino de Sousa" <jrfsousa@gmail.com>
Subject: Re: [PATCH v3, Fortran] TS 29113 testsuite
Date: Fri, 3 Sep 2021 11:18:32 -0600 [thread overview]
Message-ID: <4cc4a2dd-55bc-961f-a131-0dd1a9360fa7@codesourcery.com> (raw)
In-Reply-To: <83695368-5a76-054c-f0ad-fb5c7f1af9d2@codesourcery.com>
On 9/3/21 3:14 AM, Tobias Burnus wrote:
> If I read https://gcc.gnu.org/onlinedocs/gcc/Floating-Types.html
> correctly, we should use _Float128 for the following errors
>
> "The _Float128 type is supported on all systems where __float128 is
> supported or where long double has the IEEE binary128 format."
>
> Applies to:
>
>> For
>> typecodes-array-float128.f90
>> FAIL: gfortran.dg/c-interop/typecodes-array-float128.f90 -O0 (test
>> for excess errors)
>> Excess errors:
>> /gcc/testsuite/gfortran.dg/c-interop/typecodes-array-float128-c.c:35:32:
>> error: '__float128' undeclared (first use in this function); did you
>> mean '_Float128'?
>> typecodes-sanity.f90
>> FAIL: gfortran.dg/c-interop/typecodes-sanity.f90 -O0 (test for
>> excess errors)
>> Excess errors:
>> /gcc/testsuite/gfortran.dg/c-interop/typecodes-sanity-c.c:41:13:
>> error: '__float128' undeclared here (not in a function); did you mean
>> '_Float128'?
>> typecodes-scalar-float128.f90
>> FAIL: gfortran.dg/c-interop/typecodes-scalar-float128.f90 -O0 (test
>> for excess errors)
>> Excess errors:
>> /gcc/testsuite/gfortran.dg/c-interop/typecodes-scalar-float128-c.c:34:32:
>> error: '__float128' undeclared (first use in this function); did you
>> mean '_Float128'?
Just so I'm clear on this, the situation with ARM/AArch64 is that it
provides _Float128 but not __float128?
The GNU Fortran manual explicitly defines C_FLOAT128 as corresponding to
__float128, not _Float128 or some other 128-bit floating-point type.
https://gcc.gnu.org/onlinedocs/gcc-11.2.0/gfortran/ISO_005fC_005fBINDING.html#ISO_005fC_005fBINDING
So the situation with ARM/AArch64 is that it provides _Float128 but not
__float128?
I guess we could change the documentation and all the references in the
implementation as well as the test cases to tie this kind to _Float128
instead. I think that is backward-compatible with all existing uses?
> * * *
>> PR100914.f90
>> FAIL: gfortran.dg/PR100914.f90 -O0 (test for excess errors)
>> Excess errors:
>> /gcc/testsuite/gfortran.dg/PR100914.c:8:10: fatal error: quadmath.h:
>> No such file or directory
Does ARM/Aarch64 provide _Float128 support without also providing
libquadmath.h? I'm trying to understand why it got that particular
error. :-S
>
> * * *
>
> On a normal x86-64 system, I get XPASS for:
>
> gfortran.dg/PR100914.f90
>
> gfortran.dg/c-interop/typecodes-array-float128.f90
>
> The ! { dg-do run { xfail { { x86_64*-*-* i?86*-*-* } && longdouble128 }
> } }
> does not help as it just checks whether 'sizeof(long double)==16',
> which seemingly passes also on x86-64 with 80bit long double.
I don't understand this, either. I've been testing on an
i686-pc-linux-gnu build with both -m32 and -m64. The tests PASS on -m32
and XFAIL on -m64. The XFAIL is there because with -m64, sizeof (long
double) == 16 and it can't be disambiguated from the true 128-bit
floating point type __float128 which also has size 16, and the other
patch I committed makes it choose the standard type over the GNU
extension type. With -m32, the 80-bit long double type has size 12
instead so there is no conflict.
-Sandra
prev parent reply other threads:[~2021-09-03 17:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-01 5:53 [WIP, " Sandra Loosemore
2021-07-07 3:40 ` [PATCH, " Sandra Loosemore
2021-07-25 19:47 ` [PATCH v2, " Sandra Loosemore
2021-07-27 11:07 ` Tobias Burnus
2021-08-19 17:28 ` [PATCH v3, " Sandra Loosemore
2021-09-03 7:46 ` Christophe Lyon
2021-09-03 9:14 ` Tobias Burnus
2021-09-03 17:18 ` Sandra Loosemore [this message]
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=4cc4a2dd-55bc-961f-a131-0dd1a9360fa7@codesourcery.com \
--to=sandra@codesourcery.com \
--cc=christophe.lyon.oss@gmail.com \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=jrfsousa@gmail.com \
--cc=tkoenig@netcologne.de \
--cc=tobias@codesourcery.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).