]> gcc.gnu.org Git - gcc.git/commit
Fortran: F2018 rounding modes changes
authorFrancois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Wed, 31 Aug 2022 17:15:20 +0000 (19:15 +0200)
committerFrancois-Xavier Coudert <fxcoudert@gmail.com>
Mon, 19 Sep 2022 11:03:28 +0000 (13:03 +0200)
commit4637a1d293c978816ad622ba33e3a32a78640edd
treef7ab4b7bcfe646712d86ef182fa888f5783c65ff
parent0b5b8ac5cb7fe92dd17ae8bd7de84640daa59e84
Fortran: F2018 rounding modes changes

Add the new IEEE_AWAY rounding mode. It is unsupported on all known
targets, but could be supported by glibc and AIX as part of the C2x
proposal. Testing for now is minimal.

Add the optional RADIX argument to IEEE_SET_ROUNDING_MODE and
IEEE_GET_ROUNDING_MODE. It is unused for now, because we do not
support radices other than 2.

2022-08-31  Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>

gcc/fortran/
* libgfortran.h: Declare GFC_FPE_AWAY.

gcc/testsuite/
* gfortran.dg/ieee/rounding_2.f90: New test.

libgfortran/
* ieee/ieee_arithmetic.F90: Add RADIX argument to
IEEE_SET_ROUNDING_MODE and IEEE_GET_ROUNDING_MODE.
* config/fpu-387.h: Add IEEE_AWAY mode.
* config/fpu-aarch64.h: Add IEEE_AWAY mode.
* config/fpu-aix.h: Add IEEE_AWAY mode.
* config/fpu-generic.h: Add IEEE_AWAY mode.
* config/fpu-glibc.h: Add IEEE_AWAY mode.
* config/fpu-sysv.h: Add IEEE_AWAY mode.
gcc/fortran/libgfortran.h
gcc/testsuite/gfortran.dg/ieee/rounding_2.f90 [new file with mode: 0644]
libgfortran/config/fpu-387.h
libgfortran/config/fpu-aarch64.h
libgfortran/config/fpu-aix.h
libgfortran/config/fpu-generic.h
libgfortran/config/fpu-glibc.h
libgfortran/config/fpu-sysv.h
libgfortran/ieee/ieee_arithmetic.F90
This page took 0.073989 seconds and 6 git commands to generate.