summaryrefslogtreecommitdiff
path: root/mpz/iset.c
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2002-01-28 00:38:51 +0100
committerKevin Ryde <user42@zip.com.au>2002-01-28 00:38:51 +0100
commit550425af039e79ef13c905cca85717c344c0d76e (patch)
treea75861888a3c0041cd880d0730a4b1b4d916b2ef /mpz/iset.c
parent989028ca54ac6922f1c65f5680a3af1c778fa986 (diff)
downloadgmp-550425af039e79ef13c905cca85717c344c0d76e.tar.gz
* mpz/init.c, mpz/init2.c, mpz/iset.c, mpq/init.c [__CHECKER__]: Store
dummy values to low limbs to stop them appearing uninitialized.
Diffstat (limited to 'mpz/iset.c')
-rw-r--r--mpz/iset.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/mpz/iset.c b/mpz/iset.c
index ce2fcdbf9..38619dc89 100644
--- a/mpz/iset.c
+++ b/mpz/iset.c
@@ -1,7 +1,8 @@
/* mpz_init_set (src_integer) -- Make a new multiple precision number with
a value copied from SRC_INTEGER.
-Copyright 1991, 1993, 1994, 1996, 2000, 2001 Free Software Foundation, Inc.
+Copyright 1991, 1993, 1994, 1996, 2000, 2001, 2002 Free Software Foundation,
+Inc.
This file is part of the GNU MP Library.
@@ -40,4 +41,10 @@ mpz_init_set (mpz_ptr w, mpz_srcptr u)
MPN_COPY (wp, up, size);
w->_mp_size = usize;
+
+#ifdef __CHECKER__
+ /* let the low limb look initialized, for the benefit of mpz_get_ui etc */
+ if (size == 0)
+ wp[0] = 0;
+#endif
}