From 82a4f54cc5ff37df751528d1a30e9b573d2496ee Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Sun, 21 Jul 2013 13:54:27 +0200 Subject: re PR libfortran/35862 ([F2003] Implement new rounding modes for run time) 2013-07-21 Tobias Burnus PR fortran/35862 * libgfortran.h (GFC_FPE_DOWNWARD, GFC_FPE_TONEAREST, GFC_FPE_TOWARDZERO, GFC_FPE_UPWARD): New defines. 2013-07-21 Tobias Burnus PR fortran/35862 * libgfortran.h (set_fpu_rounding_mode, get_fpu_rounding_mode): New prototypes. * config/fpu-387.h (set_fpu_rounding_mode, get_fpu_rounding_mode): New functions. * config/fpu-aix.h (set_fpu_rounding_mode, get_fpu_rounding_mode): Ditto. * config/fpu-generic.h (set_fpu_rounding_mode, get_fpu_rounding_mode): Ditto. * config/fpu-glibc.h (set_fpu_rounding_mode, get_fpu_rounding_mode): Ditto. * config/fpu-sysv.h (set_fpu_rounding_mode, get_fpu_rounding_mode): Ditto. * configure.ac: Check for fp_rnd and fp_rnd_t. * io/io.h (enum unit_round): Use GFC_FPE_* for the value. * io/read.c (convert_real): Set FP ronding mode. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * config.h.in: Regenerate. * configure: Regenerate. 2013-07-21 Tobias Burnus PR fortran/35862 * gfortran.dg/round_4.f90: New. Co-Authored-By: Uros Bizjak From-SVN: r201093 --- gcc/fortran/ChangeLog | 6 ++++++ gcc/fortran/libgfortran.h | 6 ++++++ 2 files changed, 12 insertions(+) (limited to 'gcc/fortran') diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 3e4ecb8..785cf42 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,5 +1,11 @@ 2013-07-21 Tobias Burnus + PR fortran/35862 + * libgfortran.h (GFC_FPE_DOWNWARD, GFC_FPE_TONEAREST, + GFC_FPE_TOWARDZERO, GFC_FPE_UPWARD): New defines. + +2013-07-21 Tobias Burnus + PR fortran/57894 * check.c (min_max_args): Add keyword= check. diff --git a/gcc/fortran/libgfortran.h b/gcc/fortran/libgfortran.h index 30b3b7b..fce5294 100644 --- a/gcc/fortran/libgfortran.h +++ b/gcc/fortran/libgfortran.h @@ -43,6 +43,12 @@ along with GCC; see the file COPYING3. If not see #define GFC_FPE_UNDERFLOW (1<<4) #define GFC_FPE_INEXACT (1<<5) +/* Defines for floating-point rounding modes. */ +#define GFC_FPE_DOWNWARD 1 +#define GFC_FPE_TONEAREST 2 +#define GFC_FPE_TOWARDZERO 3 +#define GFC_FPE_UPWARD 4 + /* Bitmasks for the various runtime checks that can be enabled. */ #define GFC_RTCHECK_BOUNDS (1<<0) -- cgit v1.1