[PATCH] Use volatile global counters in test-tgmath.c.
Stefan Liebler
stli@linux.vnet.ibm.com
Wed Apr 18 11:51:00 GMT 2018
Hi,
If build with -Os on s390x, the test-tgmath fails with:
float functions not called often enough (-10000)
Within compile_testf(), the counter (count_float) is saved
before the complex functions are called.
Afterwards the saved counter differs to the current-counter.
But the tests with the complex functions do not increment count_float!
Instead count_float is saved to a register before calling totalorder
and totalordermag which both increment count_float.
The compiler is allowed to do that as totalorderf and totalordermagf
is declared with __attribute__ ((__const__)) in math/bits/mathcalls.h.
Thus this patch adjusts the global counters to be volatile.
Then count_float is saved after totalordermag.
Okay to commit?
Bye
Stefan
---
ChangeLog:
* math/test-tgmath.c (count_double, count_float,
count_ ldouble, count_cdouble, count_cfloat,
count_cldouble): Use volatile int.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 20180416_test-tgmath.patch
Type: text/x-patch
Size: 1685 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20180418/3d2cb862/attachment.bin>
More information about the Libc-alpha
mailing list