https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32667
--- Comment #64 from Patrick J. LoPresti <lopresti at gmail dot com> --- The C (and POSIX) standards have had "restrict" on the arguments to memcpy() since C99. So calling it with overlapping arguments is undefined behavior and always has been. This bug should be trivial to fix by checking for self-assignment before calling memcpy(). Doesn't GCC inline the assignments for small objects anyway? I still have no idea why this is even controversial.