diff options
author | Tobias Burnus <burnus@gcc.gnu.org> | 2019-11-27 10:16:24 +0100 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2019-11-27 10:16:24 +0100 |
commit | 90ca6847bbd0c7b2debb5a985d7f49e464f68577 (patch) | |
tree | 77faad3e0aaed75d74d5c9bba0e0f93db909089f /gcc/builtins.c | |
parent | 1f9fae28095488a9accd1e7688116ed4d145b03f (diff) | |
download | gcc-90ca6847bbd0c7b2debb5a985d7f49e464f68577.zip gcc-90ca6847bbd0c7b2debb5a985d7f49e464f68577.tar.gz gcc-90ca6847bbd0c7b2debb5a985d7f49e464f68577.tar.bz2 |
PR 92463 - Cleanups due to minimum MPFR version bump to 3.1.0
PR middle-end/92463
* configure.ac: Use MPFR_RNDN instead of GMP's MP_RNDN.
* configure: Regenerate
gcc/
PR middle-end/92463
* builtins.c (do_mpfr_ckconv, do_mpc_ckconv, do_mpfr_remquo,
do_mpfr_lgamma_r, do_mpc_arg2): Use MPFR_RNDx instead of GMP_RNDx,
mpfr_rnd_t instead of mp_rnd_t.
* fold-const-call.c (do_mpfr_ckconv, do_mpfr_arg1, do_mpfr_sincos,
do_mpfr_arg2, do_mpfr_arg3, do_mpc_arg1, do_mpc_arg2): Likewise.
* gimple-ssa-sprintf.c (format_floating_max, format_floating):
Use mpfr_exp_t instead of mp_exp_t.
* real.c (real_from_string, dconst_e_ptr, dconst_sqrt2_ptr): Use
MPFR_RNDx instead of GMP_RNDx.
* realmpfr.c (real_from_mpfr, mpfr_from_real): Use mpfr_rnd_t and
mpfr_exp_t instead mp_rnd_t and mp_exp_t, respectively.
* realmpfr.h (real_from_mpfr, mpfr_from_real): Use mpfr_rnd_t instead
of mp_rnd_t and remove MPFR_RNDx poisoning.
* ubsan.c (ubsan_instrument_float_cast): MPFR_RNDx instead of GMP_RNDx.
fortran/
PR middle-end/92463
* arith.c (gfc_check_real_range): Replace mp_exp_t by mpfr_exp_t.
From-SVN: r278761
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r-- | gcc/builtins.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c index 8296d84..36319a9 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -11045,7 +11045,7 @@ do_mpfr_ckconv (mpfr_srcptr m, tree type, int inexact) { REAL_VALUE_TYPE rr; - real_from_mpfr (&rr, m, type, GMP_RNDN); + real_from_mpfr (&rr, m, type, MPFR_RNDN); /* Proceed iff GCC's REAL_VALUE_TYPE can hold the MPFR value, check for overflow/underflow. If the REAL_VALUE_TYPE is zero but the mpft_t is not, then we underflowed in the @@ -11085,8 +11085,8 @@ do_mpc_ckconv (mpc_srcptr m, tree type, int inexact, int force_convert) { REAL_VALUE_TYPE re, im; - real_from_mpfr (&re, mpc_realref (m), TREE_TYPE (type), GMP_RNDN); - real_from_mpfr (&im, mpc_imagref (m), TREE_TYPE (type), GMP_RNDN); + real_from_mpfr (&re, mpc_realref (m), TREE_TYPE (type), MPFR_RNDN); + real_from_mpfr (&im, mpc_imagref (m), TREE_TYPE (type), MPFR_RNDN); /* Proceed iff GCC's REAL_VALUE_TYPE can hold the MPFR values, check for overflow/underflow. If the REAL_VALUE_TYPE is zero but the mpft_t is not, then we underflowed in the @@ -11138,14 +11138,14 @@ do_mpfr_remquo (tree arg0, tree arg1, tree arg_quo) { const struct real_format *fmt = REAL_MODE_FORMAT (TYPE_MODE (type)); const int prec = fmt->p; - const mp_rnd_t rnd = fmt->round_towards_zero? GMP_RNDZ : GMP_RNDN; + const mpfr_rnd_t rnd = fmt->round_towards_zero? MPFR_RNDZ : MPFR_RNDN; tree result_rem; long integer_quo; mpfr_t m0, m1; mpfr_inits2 (prec, m0, m1, NULL); - mpfr_from_real (m0, ra0, GMP_RNDN); - mpfr_from_real (m1, ra1, GMP_RNDN); + mpfr_from_real (m0, ra0, MPFR_RNDN); + mpfr_from_real (m1, ra1, MPFR_RNDN); mpfr_clear_flags (); mpfr_remquo (m0, &integer_quo, m0, m1, rnd); /* Remquo is independent of the rounding mode, so pass @@ -11218,13 +11218,13 @@ do_mpfr_lgamma_r (tree arg, tree arg_sg, tree type) { const struct real_format *fmt = REAL_MODE_FORMAT (TYPE_MODE (type)); const int prec = fmt->p; - const mp_rnd_t rnd = fmt->round_towards_zero? GMP_RNDZ : GMP_RNDN; + const mpfr_rnd_t rnd = fmt->round_towards_zero? MPFR_RNDZ : MPFR_RNDN; int inexact, sg; mpfr_t m; tree result_lg; mpfr_init2 (m, prec); - mpfr_from_real (m, ra, GMP_RNDN); + mpfr_from_real (m, ra, MPFR_RNDN); mpfr_clear_flags (); inexact = mpfr_lgamma (m, &sg, m, rnd); result_lg = do_mpfr_ckconv (m, type, inexact); @@ -11287,7 +11287,8 @@ do_mpc_arg2 (tree arg0, tree arg1, tree type, int do_nonfinite, const struct real_format *const fmt = REAL_MODE_FORMAT (TYPE_MODE (TREE_TYPE (type))); const int prec = fmt->p; - const mp_rnd_t rnd = fmt->round_towards_zero ? GMP_RNDZ : GMP_RNDN; + const mpfr_rnd_t rnd = fmt->round_towards_zero + ? MPFR_RNDZ : MPFR_RNDN; const mpc_rnd_t crnd = fmt->round_towards_zero ? MPC_RNDZZ : MPC_RNDNN; int inexact; mpc_t m0, m1; |