https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109662
--- Comment #20 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jerry DeLisle <jvdeli...@gcc.gnu.org>: https://gcc.gnu.org/g:cf3b032b8fb681516ccacbe3689f1cad43a1773a commit r14-801-gcf3b032b8fb681516ccacbe3689f1cad43a1773a Author: Jerry DeLisle <jvdeli...@gcc.gnu.org> Date: Fri May 12 12:23:00 2023 -0700 Fortran: Initialize last_char for internal units. PR fortran/109662 libgfortran/ChangeLog: * io/unit.c (set_internal_unit): Set the internal unit last_char to zero so that previous EOF characters do not influence the next read.