aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorTobias Burnus <burnus@net-b.de>2013-07-21 13:54:27 +0200
committerTobias Burnus <burnus@gcc.gnu.org>2013-07-21 13:54:27 +0200
commit82a4f54cc5ff37df751528d1a30e9b573d2496ee (patch)
treeeb32a590b892e8caf501e4b6d7803bb72a37b2fc /gcc/fortran
parent3b833dcda53c814695ce250f91ae769d20962d75 (diff)
downloadgcc-82a4f54cc5ff37df751528d1a30e9b573d2496ee.zip
gcc-82a4f54cc5ff37df751528d1a30e9b573d2496ee.tar.gz
gcc-82a4f54cc5ff37df751528d1a30e9b573d2496ee.tar.bz2
re PR libfortran/35862 ([F2003] Implement new rounding modes for run time)
2013-07-21 Tobias Burnus <burnus@net-b.de> PR fortran/35862 * libgfortran.h (GFC_FPE_DOWNWARD, GFC_FPE_TONEAREST, GFC_FPE_TOWARDZERO, GFC_FPE_UPWARD): New defines. 2013-07-21 Tobias Burnus <burnus@net-b.de> 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 <burnus@net-b.de> PR fortran/35862 * gfortran.dg/round_4.f90: New. Co-Authored-By: Uros Bizjak <ubizjak@gmail.com> From-SVN: r201093
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog6
-rw-r--r--gcc/fortran/libgfortran.h6
2 files changed, 12 insertions, 0 deletions
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 <burnus@net-b.de>
+ PR fortran/35862
+ * libgfortran.h (GFC_FPE_DOWNWARD, GFC_FPE_TONEAREST,
+ GFC_FPE_TOWARDZERO, GFC_FPE_UPWARD): New defines.
+
+2013-07-21 Tobias Burnus <burnus@net-b.de>
+
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)