diff options
author | Paul Brook <paul@codesourcery.com> | 2004-10-06 18:27:58 +0000 |
---|---|---|
committer | Paul Brook <pbrook@gcc.gnu.org> | 2004-10-06 18:27:58 +0000 |
commit | 7726f633fa2b079664c436e008b310ad36b620e1 (patch) | |
tree | 6bcba4c2581db9c072c8a3bf9c46017ff702d850 /gcc | |
parent | 575f7c2bd23fecbeeb4b01dd5e67079078d39496 (diff) | |
download | gcc-7726f633fa2b079664c436e008b310ad36b620e1.zip gcc-7726f633fa2b079664c436e008b310ad36b620e1.tar.gz gcc-7726f633fa2b079664c436e008b310ad36b620e1.tar.bz2 |
re PR libfortran/17709 (NULL I/O list and Format error.)
PR libfortran/17709
* io/transfer.c (data_transfer_init): Reset sf_seen_eor.
testsuite/
* gfortran.dg/empty_format_1.f90: New test.
From-SVN: r88615
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/empty_format_1.f90 | 21 |
2 files changed, 26 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a244c2a..0ae64e1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2004-10-06 Paul Brook <paul@codesourcery.com> + + PR libfortran/17709 + * gfortran.dg/empty_format_1.f90: New test. + 2004-10-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de> PR fortran/17568 diff --git a/gcc/testsuite/gfortran.dg/empty_format_1.f90 b/gcc/testsuite/gfortran.dg/empty_format_1.f90 new file mode 100644 index 0000000..450df6d --- /dev/null +++ b/gcc/testsuite/gfortran.dg/empty_format_1.f90 @@ -0,0 +1,21 @@ +! { dg-do run } +! PR 17709 +! We weren't resetting the internal EOR flag correctly, so the second read +! wasn't advancing to the next line. +program main + integer io_unit + character*20 str + io_unit = 10 + open (unit=io_unit,status='scratch',form='formatted') + write (io_unit, '(A)'), "Line1" + write (io_unit, '(A)'), "Line2" + write (io_unit, '(A)'), "Line3" + rewind (io_unit) + read (io_unit,'(A)') str + if (str .ne. "Line1") call abort + read (io_unit,'()') + read (io_unit,'(A)') str + if (str .ne. "Line3") call abort + close(unit=io_unit) +end + |