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: meiss...@linux.vnet.ibm.com, phone: +1 (978) 899-4797

Reply via email to