[Gmp-commit] /var/hg/gmp: mini-gmp/tests/t-limbs.c: Comment a test.

mercurial at gmplib.org mercurial at gmplib.org
Mon Feb 10 20:41:44 UTC 2014


details:   /var/hg/gmp/rev/1a3494e94d96
changeset: 16293:1a3494e94d96
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Mon Feb 10 21:41:40 2014 +0100
description:
mini-gmp/tests/t-limbs.c: Comment a test.

diffstat:

 mini-gmp/tests/t-limbs.c |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (15 lines):

diff -r 133eee634d4a -r 1a3494e94d96 mini-gmp/tests/t-limbs.c
--- a/mini-gmp/tests/t-limbs.c	Mon Feb 10 08:55:20 2014 +0100
+++ b/mini-gmp/tests/t-limbs.c	Mon Feb 10 21:41:40 2014 +0100
@@ -83,7 +83,10 @@
 	  dump ("ref", ref);
 	  abort ();
 	}
-      if (mpz_getlimbn (res, mpz_size(a)) != mpz_limbs_read (res) [mpz_size(a)])
+      /* The following test exploits a side-effect of my_mpz_mul: res
+	 points to a buffer with at least an+bn limbs, and the limbs
+	 above the result are zeroed. */
+      if (mpz_size (b) > 0 && mpz_getlimbn (res, mpz_size(a)) != mpz_limbs_read (res) [mpz_size(a)])
 	{
 	  fprintf (stderr, "getlimbn - limbs_read differ.\n");
 	  abort ();


More information about the gmp-commit mailing list