Help stabilising mini-gmp

Niels Möller nisse at lysator.liu.se
Sun Nov 20 16:08:04 UTC 2016


nisse at lysator.liu.se (Niels Möller) writes:

>> It seems "trivially" reproducible on ppc64 though, both real metal
>> versions and fake ones like ppceb-debv8 (and ppcel-debv8).
>
> I'll try to debug (if no one else beats me to it), but not today.

I've logged in to ppceb-debv8, and it's easy to reproduce. No gdb
installed, so I'm attempting printf debugging. And then I noticed that
the test succeeds if adding a few debug printouts...

I next tried adding -Wall to the command line flags, and I see

  gcc -std=gnu99 -m64  -mtune=power7 -O3 -Wall -I../.. -c
  /home/nisse/hack/gmp/mini-gmp/tests/t-signed.c -o t-signed.o
  /home/nisse/hack/gmp/mini-gmp/tests/t-signed.c: In function 'testmain':
  /home/nisse/hack/gmp/mini-gmp/tests/t-signed.c:45:26: warning: assuming
  signed overflow does not occur when assuming that (X - c) > X is always
  false [-Wstrict-overflow]
     if ((si < oi ? -1 : si > oi) != c)
                            ^
  /home/nisse/hack/gmp/mini-gmp/tests/t-signed.c:45:21: warning: assuming
  signed overflow does not occur when assuming that (X + c) >= X is always
  true [-Wstrict-overflow]
     if ((si < oi ? -1 : si > oi) != c)
                     ^

I don't quite understand neither what the testcase is doing, nor what the
warning means, since there's no subtraction in there.

Regards,
/Niels

-- 
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.


More information about the gmp-devel mailing list