diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2003-09-09 14:28:47 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2003-09-09 14:28:47 +0000 |
commit | 8e6730ff499327e3ae7be4f7ccfcd999e0caa74a (patch) | |
tree | 5ea7baf1d0b69b86a99ac9ccceef1e7a313b0424 | |
parent | c39d8b9a6fca57e9d9f2d0fffe38a22a069e3a74 (diff) | |
download | mpfr-8e6730ff499327e3ae7be4f7ccfcd999e0caa74a.tar.gz |
Case that crashes MPFR (coming from test_generic) -> function test1.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2406 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r-- | tests/tzeta.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/tests/tzeta.c b/tests/tzeta.c index 0cd4bd218..0366f7a7f 100644 --- a/tests/tzeta.c +++ b/tests/tzeta.c @@ -26,13 +26,24 @@ MA 02111-1307, USA. */ #include "mpfr.h" #include "mpfr-test.h" -void test_generic _PROTO ((void)); - #define PREC_MAX 80 #define N 2 -void -test_generic () +static void +test1 (void) +{ + mpfr_t x, y; + + mpfr_init2 (x, 32); + mpfr_init2 (y, 42); + mpfr_set_str_raw (x, "1.1111111101000111011010010010100e-1"); + mpfr_zeta (y, x, GMP_RNDN); /* shouldn't crash */ + mpfr_clear (x); + mpfr_clear (y); +} + +static void +test_generic (void) { mp_prec_t prec, yprec; int n, err; @@ -127,6 +138,8 @@ main (int argc, char *argv[]) return 0; } + test1(); + mpfr_init2 (s, MPFR_PREC_MIN); mpfr_init2 (y, MPFR_PREC_MIN); mpfr_init2 (z, MPFR_PREC_MIN); |