https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105361
--- Comment #2 from Thomas Koenig <tkoenig at gcc dot gnu.org> --- As expected: FAIL: gfortran.dg/list_read_8.f90 -O0 execution test FAIL: gfortran.dg/list_read_8.f90 -O1 execution test FAIL: gfortran.dg/list_read_8.f90 -O2 execution test FAIL: gfortran.dg/list_read_8.f90 -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions execution test FAIL: gfortran.dg/list_read_8.f90 -O3 -g execution test FAIL: gfortran.dg/list_read_8.f90 -Os execution test FAIL: gfortran.dg/streamio_16.f90 -O0 execution test FAIL: gfortran.dg/streamio_16.f90 -O1 execution test FAIL: gfortran.dg/streamio_16.f90 -O2 execution test FAIL: gfortran.dg/streamio_16.f90 -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions execution test FAIL: gfortran.dg/streamio_16.f90 -O3 -g execution test FAIL: gfortran.dg/streamio_16.f90 -Os execution test It might work to not call hit_eof only in the specific case (doing list-directed input in the user-defined I/O from within a list-directed input).