http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57633
--- Comment #4 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> --- We need to audit all places where '\n' is used and make sure we are taking care of the '\r' properly in read.c , etc. Then review what were are doing when we get a premature end of record. Maybe we are skipping a code path related to read buffers, like fbuf.