This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PR c++/39480 not really fixed


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]