2004-12-02 Bud Davis <bdavis9659@comcast.net>
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
+2004-12-02 Bud Davis <bdavis9659@comcast.net>
+
+ PR fortran/18284
+ * gfortran.dg/backspace.f90
+
2004-12-02 Bud Davis <bdavis9659@comcast.net>
* gfortran.dg/inquire.f90: New test.
--- /dev/null
+! { dg-do run }
+!pr18284 BACKSPACE broken
+ open(unit=10,access='SEQUENTIAL',status='SCRATCH')
+ do I = 1,200
+ write(10,*)I
+ end do
+ backspace(10)
+ backspace(10)
+ read(10,*)I
+ if (I.NE.199) call abort
+ end
+2004-12-02 Bud Davis <bdavis9659@comcast.net>
+
+ PR libfortran/18284
+ * io/unix.c (fd_alloc_w_at): Update file_length when extending.
+ * io/backspace.c (formatted_backspace): Reset endfile after backspace.
+
2004-12-02 Bud Davis <bdavis9659@comcast.net>
* io/inquire.c (inquire_via_unit): do not allow a direct access
if (sseek (current_unit->s, base) == FAILURE)
goto io_error;
current_unit->last_record--;
+ current_unit->endfile = NO_ENDFILE;
return;
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;