https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32667
--- Comment #56 from Richard Earnshaw <rearnsha at gcc dot gnu.org> --- I've never heard of a memcpy implementation that corrupts data if called with memcpy (p, p, n). (The problems come from partial overlaps where the direction of the copy may matter). Has anybody considered asking the standards committee to bless this as a special exception? Of course, if n is large, then performing an early test is still worthwhile, but for small n, the cost of the check possibly exceeds the benefit of eliding the copy.