https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70684
--- Comment #7 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
The following patch fixes the issue.
diff --git a/libgfortran/io/list_read.c b/libgfortran/io/list_read.c
index e24b3922..b8e174c5 100644
--- a/libgfortran/io/list_read.c
+++ b/libgfortran/io/list_read.c
@@ -197,7 +197,7 @@ check_buffers (st_parameter_dt *dtp)
}
done:
- dtp->u.p.at_eol = (c == '\n' || c == EOF);
+ dtp->u.p.at_eol = (c == '\n' || c == '\r' || c == EOF);
return c;
}
Regression tested on trunk with Linux.