https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80576
--- Comment #5 from Jeffrey A. Law <law at redhat dot com> --- Interestingly enough, it never comes up in gcc AFAICT, at least not the str* followed by memcpy/memset variant that shows up in that BZ. I don't think it'd be terribly hard to support, but if it's not going to help real code I'm not too inclined to add the complexity. The non-constant memcpy followed by a full object memset isn't optimized either. But that's a function of the non-constant sized memcpy. It'd likely fall into the same bucket too. Let me do some instrumentation on this variant.