https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122727
--- Comment #9 from M Welinder <terra at gnome dot org> --- Created attachment 62850 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=62850&action=edit Reduced^2 sample https://godbolt.org/z/Mdnn3e4aj Further reduced case. This one uses a class "strung" that's a parody of std::string. It keeps the small-big split, but doesn't bother keeping track of the actual characters in short strungs. Hence it does not need a local buffer. Note, that all writes are to either class member variables or to freshly allocated memory. All very vanilla. We still can't deduce that the three "+=" never need to reallocate.
