This is the mail archive of the
mailing list for the GCC project.
PR c++/39480 not really fixed
- From: David Miller <davem at davemloft dot net>
- To: gcc at gcc dot gnu dot org
- Cc: jason at redhat dot com
- Date: Fri, 28 Oct 2011 03:48:37 -0400 (EDT)
- Subject: PR c++/39480 not really fixed
g++.dg/init/copy7.C makes sure that memcpy() is not emitted with
src and dst equal.
The fix installed absolutely relies upon a backend implementing
the movmem pattern, and essentially that such a pattern will
always succeed to emit for arbitrary circumstances.
However 1) not all platforms implement the pattern, it is not
required, therefore it cannot be relied upon for correct code
generation and 2) even those that implement this pattern have certain
restrictions which could legitimately be triggered and thus cause the
memcpy() with src and dst equal to still be emitted.
Sparc is currently failing this testcase for reason #1, but it would
be trivial to make minor modifications to the copy7.C test case to get
it to fail on a score of several targets as well (even those that
provide a movmem pattern).
So we should either install a more complete fix or open the bug back