summaryrefslogtreecommitdiff
path: root/tests/tget_set_d64.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2019-07-22 10:16:00 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2019-07-22 10:16:00 +0000
commitfeca79c57e3bd1bc08c377e683d23a2afed42baf (patch)
tree68d65b6825169c2a05e7e374151bba2f7359be7c /tests/tget_set_d64.c
parenta0cbf6df3aea572962d1ba8a20f85b86bd0dfd33 (diff)
downloadmpfr-feca79c57e3bd1bc08c377e683d23a2afed42baf.tar.gz
[tests/tget_set_d64.c] More meaningful name of a test with a
non-canonical encoding and more details (fails with Debian's gcc-snapshot 10.0.0 20190718, trunk revision 273586). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13530 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tget_set_d64.c')
-rw-r--r--tests/tget_set_d64.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/tget_set_d64.c b/tests/tget_set_d64.c
index 1f7efa400..a25f23353 100644
--- a/tests/tget_set_d64.c
+++ b/tests/tget_set_d64.c
@@ -480,7 +480,7 @@ powers_of_10 (void)
}
static void
-coverage (void)
+noncanonical (void)
{
/* The code below assumes BID. */
#ifndef DPD_FORMAT
@@ -499,7 +499,14 @@ coverage (void)
x.s.manl += 1; /* then the significand equals 10^16 */
y.d = x.d;
mpfr_set_decimal64 (z, y.d64, MPFR_RNDN);
- MPFR_ASSERTN(mpfr_zero_p (z) && mpfr_signbit (z) == 0);
+ /* Fails with r13530 and gcc (Debian 20190719-1) 10.0.0 20190718
+ (experimental) [trunk revision 273586] */
+ if (MPFR_NOTZERO (z) || MPFR_IS_NEG (z))
+ {
+ printf ("Error in noncanonical. Expected +0, got:\n");
+ mpfr_dump (z);
+ exit (1);
+ }
mpfr_clear (z);
}
#endif
@@ -558,7 +565,7 @@ main (int argc, char *argv[])
#if !defined(MPFR_ERRDIVZERO)
check_random_bytes ();
#endif
- coverage ();
+ noncanonical ();
check_misc ();
check_random ();
check_native ();