diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 175edd483a3a..00f5518815af 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2004-06-09 Bud Davis + + PR gfortran/15755 + * gfortran.fortran-torture/execute/backspace.c : New test. + 2004-06-09 Paul Brook * gfortran.fortran-torture/execure/intrinsic_associated.f90 diff --git a/gcc/testsuite/gfortran.fortran-torture/execute/backspace.f90 b/gcc/testsuite/gfortran.fortran-torture/execute/backspace.f90 new file mode 100644 index 000000000000..16f5523e3537 --- /dev/null +++ b/gcc/testsuite/gfortran.fortran-torture/execute/backspace.f90 @@ -0,0 +1,14 @@ +! pr 15755 + implicit none + character*1 C + open(10) + write(10,*)'a' + write(10,*)'b' + write(10,*)'c' + rewind(10) + read(10,*)C + backspace(10) + read(10,*) C + if (C.ne.'b') call abort + close(10,STATUS='DELETE') + end diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index d67ee65e0b34..ab7d37633db8 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,9 @@ +2004-06-09 Bud Davis + + PR gfortran/15755 + * io/backspace.c(st_backspace): call correct routine for + formatted and un-formatted units. + 2004-05-30 Andreas Jaeger , Steven Bosscher PR gfortran/11800 diff --git a/libgfortran/io/backspace.c b/libgfortran/io/backspace.c index aff4c5e29e34..c40e506c8764 100644 --- a/libgfortran/io/backspace.c +++ b/libgfortran/io/backspace.c @@ -149,7 +149,7 @@ st_backspace (void) if (file_position (u->s) == 0) goto done; /* Common special case */ - if (u->flags.form == FORM_UNFORMATTED) + if (u->flags.form == FORM_FORMATTED) formatted_backspace (); else unformatted_backspace ();