PR fortran/47878 * io/transfer.c (read_sf): Call fbuf_getptr only at the end, and subtract n, dtp->u.p.sf_seen_eor and seen_comma from it. * gfortran.dg/pr47878.f90: New test. From-SVN: r170476