Re: timespec test failure on Linux/s390x

2021-09-12 Thread Bruno Haible
Paul Eggert wrote: > > I can't determine whether it's a GCC or a QEMU bug. > > Surely it is a QEMU bug, as QEMU isn't properly implementing the > z/Architecture Principles of Operation (POP). Thanks; I didn't know about this document. > Page 7-25 of the current > edition (SA22-7832-12) says th

Re: timespec test failure on Linux/s390x

2021-09-12 Thread Paul Eggert
On 9/12/21 8:28 AM, Bruno Haible wrote: I can't determine whether it's a GCC or a QEMU bug. Surely it is a QEMU bug, as QEMU isn't properly implementing the z/Architecture Principles of Operation (POP). Page 7-25 of the current edition (SA22-7832-12) says that the AGR instruction treats its o

Re: timespec test failure on Linux/s390x

2021-09-12 Thread Bruno Haible
Paul Eggert wrote: > That value of 'sum' is wrong; it should be most-negative value {tv_sec = > -9223372036854775808, tv_nsec = 0} because A and B are both that value, > and 'sum = timespec_add (a, b)' is supposed to be saturated addition. > > My guess is that timespec-add.c's line 49 'INT_ADD_W

Re: timespec test failure on Linux/s390x

2021-08-29 Thread Bruno Haible
Paul Eggert wrote: > Which version of GCC are you using? s390x-linux-gnu-gcc-10 (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0 > I suspect the bug is in the earlier call to timespec_add, as mentioned > above. I'll debug that call... Bruno

Re: timespec test failure on Linux/s390x

2021-08-29 Thread Paul Eggert
On 8/29/21 6:15 PM, Bruno Haible wrote: ../../gltests/test-timespec.c:152: assertion 'eq (timespec_add (a, sumbc), timespec_add (sum, c))' failed Aborted (core dumped) In test-timespec.c:152 the local variables are: ... ntests = 26 computed_hz = 10 i = 1 a = {tv_sec = -9223372036854775

timespec test failure on Linux/s390x

2021-08-29 Thread Bruno Haible
In a testdir of all of Gnulib, on Linux/s390x, test-timespec fails: ../../gltests/test-timespec.c:152: assertion 'eq (timespec_add (a, sumbc), timespec_add (sum, c))' failed Aborted (core dumped) In test-timespec.c:152 the local variables are: test = {{tv_sec = -9223372036854775808, tv_nsec = -