diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2012-02-22 12:32:52 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2012-02-22 12:32:52 +0000 |
commit | 84922b217be0dc048745888a8f1d0ca73c7a8f37 (patch) | |
tree | 6a21c26faaa8974cd3c599b8cba4bcebce742e71 /tests/tinits.c | |
parent | dfeadd9878f0fb973d14becf95c8152e1108ac0d (diff) | |
download | mpfr-84922b217be0dc048745888a8f1d0ca73c7a8f37.tar.gz |
[tests/tinits.c] Updated the large precision test to trigger a bug fixed
in r8025 on 32-bit machines (or when MPFR is built with -m32). Here the
crash was due to (MPFR_PREC (b) + GMP_NUMB_BITS-1)/GMP_NUMB_BITS in
"src/set.c".
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8031 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tinits.c')
-rw-r--r-- | tests/tinits.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/tinits.c b/tests/tinits.c index d133249bb..8cb5d648a 100644 --- a/tests/tinits.c +++ b/tests/tinits.c @@ -43,14 +43,15 @@ main (void) if (getenv ("MPFR_CHECK_LARGEMEM") != NULL && large_prec <= MPFR_PREC_MAX) { - mpfr_init2 (a, large_prec); + mpfr_inits2 (large_prec, a, b, (mpfr_ptr) 0); mpfr_set_ui (a, 17, MPFR_RNDN); + mpfr_set (b, a, MPFR_RNDN); if (mpfr_get_ui (a, MPFR_RNDN) != 17) { printf ("Error in mpfr_init2 with precision 2^31-1\n"); exit (1); } - mpfr_clear (a); + mpfr_clears (a, b, (mpfr_ptr) 0); } tests_end_mpfr (); |