This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PR c++/39480 not really fixed
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: David Miller <davem at davemloft dot net>
- Cc: gcc at gcc dot gnu dot org, jason at redhat dot com
- Date: Fri, 28 Oct 2011 11:27:25 +0200
- Subject: Re: PR c++/39480 not really fixed
- References: <20111028.034837.1165572418982984269.davem@davemloft.net>
On Fri, Oct 28, 2011 at 9:48 AM, David Miller <davem@davemloft.net> 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.
> 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.
No, it doesn't. And you can trigger similar C testcases to fail on x86_64
as well.
> 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
> up.
We should remove the testcase.
Richard.