This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH #3], Fix _Complex when there are multiple FP types the same size
- From: Michael Meissner <meissner at linux dot vnet dot ibm dot com>
- To: FX <fxcoudert at gmail dot com>
- Cc: Michael Meissner <meissner at linux dot vnet dot ibm dot com>, Bernd Schmidt <bschmidt at redhat dot com>, Janne Blomqvist <jb at gcc dot gnu dot org>, Tobias Burnus <burnus at net-b dot de>, "FranC'ois-Xavier Coudert" <fxcoudert at gcc dot gnu dot org>, Jerry DeLisle <jvdelisle at gcc dot gnu dot org>, Erik Edelmann <erik dot edelmann at iki dot fi>, Daniel Franke <franke dot daniel at gmail dot com>, Thomas KC6nig <tkoenig at gcc dot gnu dot org>, Daniel Kraft <d at domob dot eu>, Toon Moene <toon at moene dot org>, Mikael Morin <mikael dot morin at sfr dot fr>, tobias dot schlueter at physik dot uni-muenchen dot de, Paul Thomas <pault at gcc dot gnu dot org>, Janus Weil <janus at gcc dot gnu dot org>, Segher Boessenkool <segher at kernel dot crashing dot org>, gcc-patches at gcc dot gnu dot org, David Edelsohn <dje dot gcc at gmail dot com>, Bill Schmidt <wschmidt at linux dot vnet dot ibm dot com>
- Date: Mon, 2 May 2016 17:46:43 -0400
- Subject: Re: [PATCH #3], Fix _Complex when there are multiple FP types the same size
- Authentication-results: sourceware.org; auth=none
- References: <20160428210613 dot GA29745 at ibm-tiger dot the-meissners dot org> <20160428221006 dot GC6575 at gate dot crashing dot org> <20160428234057 dot GA20519 at ibm-tiger dot the-meissners dot org> <20160429205127 dot GA19596 at ibm-tiger dot the-meissners dot org> <20160430160045 dot GA15163 at gate dot crashing dot org> <572731F3 dot 2060104 at redhat dot com> <20160502211024 dot GA17046 at ibm-tiger dot the-meissners dot org> <84EB8F4B-103C-4534-904E-A2A7CA067A7F at gmail dot com>
On Mon, May 02, 2016 at 11:24:25PM +0200, FX wrote:
> Hi Michael,
>
> Thanks for letting us know.
>
> Right now, the Fortran front-end uses the following real modes:
> - those corresponding to {float,double,long_double}_type_node
> - TFmode (if libquadmath support is enabled)
> and then uses the corresponding complex modes.
>
> So, I guess the question in your case is: in each compiler settings, is there a TFmode? If so, that would not play nice: the front-end current does not handle several real modes with equal precision.
There is a TFmode. Right now, the default for TFmode is IBM extended double,
and __float128 is a keyword added to C/C++ to get the IEEE 128-bit floating
point type.
At the moment, libquadmath is not enabled (complex support is one of the
issues, and having all of the built-ins registers, etc. is another), but I'm
hoping in the GCC 7 time frame to get it supported.
There is an option to switch the default from IBM extended double to IEEE
128-bit, but we need to enhance the libraries before we can let users use
it. Ideally by the time GCC 7 is released, users will be able to use IEEE
128-bit floating point as their default long double format. Our motivation is
that the upcoming power9 hardware has IEEE 128-bit hardware support (and the
fact that there are a lot of accuracy issues with the current IBM extended
double format).
So, I'm trying to do these stepps in a piecemeal fashion, rather than having
one giant flag day.
> In case you want to test, simple Fortran code to create a 128-bit real x and complex y is:
>
> real(kind=16) :: x
> complex(kind=16) :: y
>
> Iâm guessing if that emits the correct code in both settings, the rest should be fine.
Yes. I suspect right now, there isn't an issue, since you are using the default
type nodes.
--
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meissner@linux.vnet.ibm.com, phone: +1 (978) 899-4797