This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] PR string/19907: Incorrect memcpy tests
- From: Florian Weimer <fw at deneb dot enyo dot de>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Sun, 08 May 2016 19:14:48 +0200
- Subject: Re: [PATCH] PR string/19907: Incorrect memcpy tests
- Authentication-results: sourceware.org; auth=none
- References: <20160405050218 dot GA5157 at gmail dot com> <CAMe9rOr-WhT-RbxvrFNwOh9OiqiF8hJFHm6D18povJJBADB5RQ at mail dot gmail dot com>
* H. J. Lu:
> + /* Must clear the destination buffer set by the previous run. */
> + for (i = 0; i < len; i++)
> + dst[i] = 0;
Doesn't this need some sort of compiler barrier so that GCC will not
eliminate the dead stores if it recognizes a memset-style loop?