This is the mail archive of the
mailing list for the GCC project.
Re: PR c++/39480 not really fixed
From: Richard Guenther <firstname.lastname@example.org>
Date: Fri, 28 Oct 2011 11:27:25 +0200
> On Fri, Oct 28, 2011 at 9:48 AM, David Miller <email@example.com> wrote:
>> g++.dg/init/copy7.C makes sure that memcpy() is not emitted with
>> src and dst equal.
> The testcase is bogus and should be removed. See the patch I posted
> (and the PR). Unfortunately the patch didn't get any review yet.
Thanks. Which patch and PR are you talking about, 39480?
Meanwhile, if the conclusion is that memcpy(x, x, ...) is legal, I
disagree. I can think of implementations where this will break.
For example, if the memcpy implementation does a cache initializing
store on the first cache line of the destination before fetching the
beginning of the source, such memcpy() calls with src==dst will