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]

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
up.


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