[Bug tree-optimization/80576] dead strcpy and strncpy followed by memset not eliminated

law at redhat dot com gcc-bugzilla@gcc.gnu.org
Mon Jul 15 22:46:00 GMT 2019


--- 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.

More information about the Gcc-bugs mailing list