bug in longlong.h for aarch64 sub_ddmmss

Paul Zimmermann Paul.Zimmermann at inria.fr
Wed Jun 17 14:08:52 UTC 2020


       Dear Torbjörn,

> A crude test generator: [...]

great! On gcc115 it fails with the longlong.h shipped with GMP 6.2.0:

zimmerma at gcc115:/tmp/gmp-6.2.0$ /opt/cfarm/gcc-latest/bin/gcc test.c
zimmerma at gcc115:/tmp/gmp-6.2.0$ ./a.out > test1.c
zimmerma at gcc115:/tmp/gmp-6.2.0$ /opt/cfarm/gcc-latest/bin/gcc test1.c -lgmp
zimmerma at gcc115:/tmp/gmp-6.2.0$ ./a.out 
error for f2(0x1,0x0): want (0x0,0x1) got (0xffffffffffffffff,0x1)
...
error for f4034(0xffff7fff,0x0): want (0x0,0xffffffffffff7fff) got (0xffffffffffffffff,0xffffffffffff7fff)

With the patch you sent it works:

zimmerma at gcc115:/tmp/gmp-6.2.0$ ./a.out
zimmerma at gcc115:/tmp/gmp-6.2.0$ 

Paul


More information about the gmp-bugs mailing list