https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118693
--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> --- Yes, I can reproduce it just using 'wc' on the command line, without using the std::getline code at all. Running wc on the file directly shows it's 4930 bytes, but copying and pasting that file's contents into the standard input of wc only shows 4098 bytes.