This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [fortran,patch] Extend IEEE support to all real kinds
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: FX <fxcoudert at gmail dot com>
- Cc: gfortran <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 3 Aug 2015 23:55:55 +0200
- Subject: Re: [fortran,patch] Extend IEEE support to all real kinds
- Authentication-results: sourceware.org; auth=none
- References: <047F276D-C2C2-4119-A416-4271D8F369F2 at gmail dot com>
On Mon, Aug 3, 2015 at 11:14 PM, FX <fxcoudert@gmail.com> wrote:
> The attached patch extends the IEEE modules to all floating-point kinds. Last time, when I added IEEE support, I restricted it to the float and double types (real kinds 4 and 8), to be extra safe. After discussion with Uros Bizjak and some reading, Iâve come to the conclusion that on most hardware where we support IEEE at all, we do support enough IEEE features on extended and quad prec (long double and __float128, on x86_64 hardware) to satisfy the Fortran standard.
>
> So, this enables full IEEE support for all real kinds. Nothing changes to the underlying architecture, itâs almost exclusively mechanical changes (adding the necessary variants to the interfaces, etc.).
>
> Bootstrapped and regtested on x86_64-apple-darwin14 (with associated libquadmath patch: https://gcc.gnu.org/ml/gcc-patches/2015-08/msg00124.html).
> OK to commit to trunk?
Can you please also introduce tests for ieee exceptions for long
double and __float128 types (as is done for real and double in
gfortran.dg/ieee/ieee_1.F90) as well as test for supported rounding
modes as done for real and double in gfortran.dg/ieee/rounding_1.f90 ?
On x86_64, these new tests will exercise exceptions and rounding modes
for __float128 soft-fp library, in addition to x87 long double tests.
Uros.