Commit ab3a378a by Jerry DeLisle

re PR fortran/81160 (arith.c:2009: bad statement order ?)

2017-06-24  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/81160
	* arith.c (wprecision_int_real): Set return value before
	mpz_clear and then return after it.

From-SVN: r249627
parent 22235619
2017-06-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/81160
* arith.c (wprecision_int_real): Set return value before
mpz_clear and then return after it.
2017-06-15 Janus Weil <janus@gcc.gnu.org> 2017-06-15 Janus Weil <janus@gcc.gnu.org>
PR fortran/80983 PR fortran/80983
......
...@@ -2001,13 +2001,14 @@ wprecision_real_real (mpfr_t r, int from_kind, int to_kind) ...@@ -2001,13 +2001,14 @@ wprecision_real_real (mpfr_t r, int from_kind, int to_kind)
static bool static bool
wprecision_int_real (mpz_t n, mpfr_t r) wprecision_int_real (mpz_t n, mpfr_t r)
{ {
bool ret;
mpz_t i; mpz_t i;
mpz_init (i); mpz_init (i);
mpfr_get_z (i, r, GFC_RND_MODE); mpfr_get_z (i, r, GFC_RND_MODE);
mpz_sub (i, i, n); mpz_sub (i, i, n);
return mpz_cmp_si (i, 0) != 0; ret = mpz_cmp_si (i, 0) != 0;
mpz_clear (i); mpz_clear (i);
return ret;
} }
/* Convert integers to integers. */ /* Convert integers to integers. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment