aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/arith.c
diff options
context:
space:
mode:
authorJanne Blomqvist <jb@gcc.gnu.org>2019-11-20 22:01:25 +0200
committerJanne Blomqvist <jb@gcc.gnu.org>2019-11-20 22:01:25 +0200
commitc9d4cc5df27acfcea40e18cdcd6933b3b1349b9a (patch)
treee8fd26d7def5f8f2d1792b2063da1a8ed5b9ba6b /gcc/fortran/arith.c
parent64eb1c8239dd73e1ded3a1ef2d6f080164cd4ce9 (diff)
downloadgcc-c9d4cc5df27acfcea40e18cdcd6933b3b1349b9a.zip
gcc-c9d4cc5df27acfcea40e18cdcd6933b3b1349b9a.tar.gz
gcc-c9d4cc5df27acfcea40e18cdcd6933b3b1349b9a.tar.bz2
PR 92463 MPFR modernization in GFortran
Now that we require a minimum of MPFR 3.1.0+ to build GCC, we can do some modernization of the MPFR usage in the GFortran frontend. This patch replaces 1) GMP_RND* with MPFR_RND* 2) mp_exp_t with mpfr_exp_t 3) mp_prec_t with mpfr_prec_t 4) mp_rnd_t with mpfr_rnd_t gcc/fortran/ChangeLog: 2019-11-20 Janne Blomqvist <jb@gcc.gnu.org> PR fortran/92463 * arith.c (gfc_mpfr_to_mpz): Change mp_exp_t to mpfr_exp_t. (gfc_check_real_range): Likewise. * gfortran.h (GFC_RND_MODE): Change GMP_RNDN to MPFR_RNDN. * module.c (mio_gmp_real): Change mp_exp_t to mpfr_exp_t. * simplify.c (degrees_f): Change mp_rnd_t to mpfr_rnd_t. (radians_f): Likewise. (fullprec_erfc_scaled): Change mp_prec_t to mpfr_prec_t. (asympt_erfc_scaled): Likewise. (gfc_simplify_nearest): Change mp_exp_t to mpfr_exp_t, and GMP_RND* to MPFR_RND*. From-SVN: r278523
Diffstat (limited to 'gcc/fortran/arith.c')
-rw-r--r--gcc/fortran/arith.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/fortran/arith.c b/gcc/fortran/arith.c
index a40163e..cf48077 100644
--- a/gcc/fortran/arith.c
+++ b/gcc/fortran/arith.c
@@ -38,7 +38,7 @@ along with GCC; see the file COPYING3. If not see
void
gfc_mpfr_to_mpz (mpz_t z, mpfr_t x, locus *where)
{
- mp_exp_t e;
+ mpfr_exp_t e;
if (mpfr_inf_p (x) || mpfr_nan_p (x))
{
@@ -376,7 +376,7 @@ gfc_check_real_range (mpfr_t p, int kind)
}
else if (mpfr_cmp (q, gfc_real_kinds[i].tiny) < 0)
{
- mp_exp_t emin, emax;
+ mpfr_exp_t emin, emax;
int en;
/* Save current values of emin and emax. */
@@ -396,9 +396,9 @@ gfc_check_real_range (mpfr_t p, int kind)
/* Copy sign if needed. */
if (mpfr_sgn (p) < 0)
- mpfr_neg (p, q, GMP_RNDN);
+ mpfr_neg (p, q, MPFR_RNDN);
else
- mpfr_set (p, q, GMP_RNDN);
+ mpfr_set (p, q, MPFR_RNDN);
}
mpfr_clear (q);