GMP 6.1.2 t-count_zeros failure on ARM with assertions

Vincent Lefevre vincent at vinc17.net
Mon Dec 25 23:29:13 UTC 2017


I've built GMP 6.1.2 with assertions:

  ./configure --enable-assert --prefix=$HOME/opt/gmp-6.1.2

on an old ARM VM (Debian squeeze). But I get the failure:

FAIL: t-count_zeros
===================

t-count_zeros.c:31: GNU MP assertion failed: (n) != 0
FAIL t-count_zeros (exit status: 134)

I've added some printf's in the code, and this is due to:

#ifdef COUNT_LEADING_ZEROS_0
  check_clz (COUNT_LEADING_ZEROS_0, CNST_LIMB(0));
#endif

If GMP does a test with CNST_LIMB(0), I wonder why it has an
assertion (n) != 0. This is not consistent!

$ gcc -v
Using built-in specs.
Target: arm-linux-gnueabi
Configured with: ../src/configure -v --with-pkgversion='Debian 4.4.5-8' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.4 --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --disable-sjlj-exceptions --enable-checking=release --build=arm-linux-gnueabi --host=arm-linux-gnueabi --target=arm-linux-gnueabi
Thread model: posix
gcc version 4.4.5 (Debian 4.4.5-8) 

$ uname -a
Linux ypig-arm 2.6.32-5-versatile #1 Wed Jan 12 23:05:11 UTC 2011 armv5tejl GNU/Linux

$ ./config.guess
arm9te-unknown-linux-gnueabi

$ ./configfsf.guess
armv5tejl-unknown-linux-gnueabi

-- 
Vincent Lefèvre <vincent at vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


More information about the gmp-bugs mailing list