OSDN Git Service

2007-12-13 Thomas Koenig <tkoenig@gcc.gnu.org>
authortkoenig <tkoenig@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 13 Dec 2007 19:35:09 +0000 (19:35 +0000)
committertkoenig <tkoenig@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 13 Dec 2007 19:35:09 +0000 (19:35 +0000)
commit442c1e06790600fe721015acaa931f030d33eb03
tree7ee9f3011890308864977fc29d3c36da9d6ab850
parent05da47ad3b9968881f0bfe4e1d63e19b1e04b770
2007-12-13  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR libfortran/34370
PR libfortran/34323
PR libfortran/34405
* io/io.h:  Add previous_nonadvancing_write to gfc_unit.
Add prototype for finish_last_advance_record.
* io/file_pos.c (st_backspace):  Generate error if backspace is
attempted for direct access or unformatted stream.
If there are bytes left from a previous ADVANCE="no", write
them out before performing the backspace.
(st_endfile):  Generate error if endfile is attempted for
direct access.
If there are bytes left from a previous ADVANCE="no", write
them out before performing the endfile.
(st_rewind):  Generate error if rewind is attempted for
direct access.
* unit.c (close_unit_1):  Move functionality to write
previously written bytes to...
(finish_last_advance_record):  ... here.
* transfer.c (data_transfer_init):  If reading, reset
previous_nonadvancing_write.
(finalize_transfer):  Set the previous_noadvancing_write
flag if we are writing and ADVANCE="no" was specified.
Only call next_record() if advance="no" wasn't specified.

2007-12-13  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR libfortran/34370
PR libfortran/34323
PR libfortran/34405
* gfortran.dg/advance_6.f90:  New test case.
* gfortran.dg/direct_io_7.f90:  New test case.
* gfortran.dg/streamio_13.f90:  New test case.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@130912 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/advance_6.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/direct_io_7.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/streamio_13.f90 [new file with mode: 0644]
libgfortran/ChangeLog
libgfortran/io/file_pos.c
libgfortran/io/io.h
libgfortran/io/transfer.c
libgfortran/io/unit.c