The compiler is the implementation; it cannot <i>cause</i> &quot;undefined behavior&quot;.<p>What it can be is &quot;nonconforming&quot;.<p>A correct program which hits that situation continues to have well-defined behavior (which we know from the text of the program and the standard).  Just the implementation isn&#x27;t handling the requirements correctly; it is not conforming.<p>An implementation is not bound by the standard in its own use of the standard library functions. The implementation can use a function like memcpy in ways that would be formally undefined if they occured in user code; its implementation of memcpy just has to harmonize with that use, so that the intended behavior is ensured.
This is because implementations can add their own requirements to areas that the standard leaves undefined. For instance, an implementation can add the requirement to its memcpy that the copy may overlap, if the destination has a lower address. Then, the implementation can generate code which uses memcpy that way, or make internal uses of memcpy from other library functions which use it that way. It&#x27;s just using its own (possibly not publicly documented) extension.