https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86075
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2018-06-07 Ever confirmed|0 |1 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- But then the strlen pass should see the zeroing and then notice the memcpy will produce a 0-terminated string. The user might have written this w/o the a[3] = 0 in place after all. So IMHO not a DSE fault but possibly a dup of another strlen missed optimization.