https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68838
--- Comment #3 from David Edelsohn <dje at gcc dot gnu.org> --- .good: 0 .fail: 1 width: 50000000 size: 33554432 str_01[0]: 97 oss_01.str()[0]: 32 The string is filled with L'a' (0x97). The stringstream is filled with space (0x32) and width is not set to 0 although size is non-zero. Assuming that this is using include/bits/ostream_insert.h:__ostream_insert(), this would seem to stop before the __out.width(0) statement.