Fix string/tst-xbzero-opt if build with gcc head.

Stefan Liebler stli@linux.ibm.com
Thu Jul 12 14:22:00 GMT 2018


Fix string/tst-xbzero-opt is build with gcc head.

On s390x, the test string/tst-xbzero-opt is failing if build with GCC head:
FAIL: no clear/prepare: expected 32 got 0
FAIL: no clear/test: expected some got 0
FAIL: ordinary clear/prepare: expected 32 got 0
INFO: ordinary clear/test: found 0 patterns (memset not eliminated)
PASS: explicit clear/prepare: expected 32 got 32
PASS: explicit clear/test: expected 0 got 0

In setup_no_clear / setup_ordinary_clear, GCC is omitting the memcpy 
loop in prepare_test_buffer. Thus count_test_patterns does not find any 
of the test_pattern.

This patch introduces a compiler barrier just after filling the buffer.

If okay, shall this be committed before or after the release?

Bye
Stefan

---

ChangeLog:

	* string/tst-xbzero-opt.c (prepare_test_buffer):
	Add compiler barrier.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 20180712_string_tst_xbzero_opt.patch
Type: text/x-patch
Size: 1514 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20180712/50bad7b2/attachment.bin>


More information about the Libc-alpha mailing list