From 78579b601d74b339eadbc08bb3cf1a4c48a70f69 Mon Sep 17 00:00:00 2001 From: Bud Davis Date: Thu, 2 Dec 2004 04:29:00 +0000 Subject: re PR libfortran/18284 (BACKSPACE broken) 2004-12-02 Bud Davis PR libfortran/18284 * io/unix.c (fd_alloc_w_at): Update file_length when extending. * io/backspace.c (formatted_backspace): Reset endfile after backspace. PR fortran/18284 * gfortran.dg/backspace.f90 From-SVN: r91612 --- libgfortran/io/unix.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libgfortran/io/unix.c') diff --git a/libgfortran/io/unix.c b/libgfortran/io/unix.c index 5be631a..8e3afbd 100644 --- a/libgfortran/io/unix.c +++ b/libgfortran/io/unix.c @@ -462,6 +462,9 @@ fd_alloc_w_at (unix_stream * s, int *len, gfc_offset where) s->logical_offset = where + *len; + if (where + *len > s->file_length) + s->file_length = where + *len; + n = s->logical_offset - s->buffer_offset; if (n > s->active) s->active = n; -- cgit v1.1