diff options
| -rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
| -rw-r--r-- | gcc/testsuite/gfortran.fortran-torture/execute/backspace.f90 | 14 | ||||
| -rw-r--r-- | libgfortran/ChangeLog | 6 | ||||
| -rw-r--r-- | libgfortran/io/backspace.c | 2 |
4 files changed, 26 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 175edd4..00f5518 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2004-06-09 Bud Davis <bdavis9659@comcast.net> + + PR gfortran/15755 + * gfortran.fortran-torture/execute/backspace.c : New test. + 2004-06-09 Paul Brook <paul@codesourcery.com> * 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 0000000..16f5523 --- /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 d67ee65e..ab7d376 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,9 @@ +2004-06-09 Bud Davis <bdavis9659@comcast.net> + + PR gfortran/15755 + * io/backspace.c(st_backspace): call correct routine for + formatted and un-formatted units. + 2004-05-30 Andreas Jaeger <aj@suse.de>, Steven Bosscher <stevenb@suse.de> PR gfortran/11800 diff --git a/libgfortran/io/backspace.c b/libgfortran/io/backspace.c index aff4c5e..c40e506 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 (); |
