aboutsummaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
authorJerry DeLisle <jvdelisle@gcc.gnu.org>2024-03-26 16:44:17 -0700
committerJerry DeLisle <jvdelisle@gcc.gnu.org>2024-03-26 17:13:51 -0700
commit41e767c482fc903ca5d54014b034c7526dbf8f1c (patch)
tree0414ba62d07a5e77d797ce128f96d20e06d69a62 /libgfortran
parentfb1d50e1f6e07c146999b1b773043c140fdc72b5 (diff)
libgfortran: Fix file position after ENDFILE statement.
PR libfortran/107031 libgfortran/ChangeLog: * io/file_pos.c (st_endfile): Remove call to next_record(). gcc/testsuite/ChangeLog: * gfortran.dg/endfile_5.f90: New test.
Diffstat (limited to 'libgfortran')
-rw-r--r--libgfortran/io/file_pos.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/libgfortran/io/file_pos.c b/libgfortran/io/file_pos.c
index 2bc05b293f8..d169961f997 100644
--- a/libgfortran/io/file_pos.c
+++ b/libgfortran/io/file_pos.c
@@ -352,7 +352,6 @@ st_endfile (st_parameter_filepos *fpp)
dtp.common = fpp->common;
memset (&dtp.u.p, 0, sizeof (dtp.u.p));
dtp.u.p.current_unit = u;
- next_record (&dtp, 1);
}
unit_truncate (u, stell (u->s), &fpp->common);