https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117793
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to Jan Hubicka from comment #0) > However we also get > __builtin_memcpy (_55, "this text is longer than 15 characters", 38); > ... > __builtin_memcpy (_108, _55, 38); > > If we were able to rewrite _108 to _55 we would optimize away the new/delete > pair. We probably can also expand the memcpy inline like for ".txt" This is aggregate copy prop. What we could do is replace the last copy by __builtin_memcpy (_108, "this text is longer than 15 characters", 38); but this might be a pessimization in case none of the copies gets optimized. Note FRE should be able to look through such a copy chain if it's a redundancy that we're missing. > MEM <unsigned int> [(void *)_108 + 38B] = 1954051118;