http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59611
Bug ID: 59611
Summary: std::copy performs worse than naive implementation
when copying a single known byte
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: gcc-bugzilla at contacts dot eelis.net
Created attachment 31524
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31524&action=edit
Testcase
The attached testcase shows how using a naive implementation (mycopy) causes
gcc to generate better code than using std::copy.
(Clang /does/ generate optimal code when using std::copy in this case.)