OSDN Git Service

2006-12-06 Thomas Koenig <Thomas.Koenig@online.de>
authortkoenig <tkoenig@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 6 Dec 2006 19:25:44 +0000 (19:25 +0000)
committertkoenig <tkoenig@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 6 Dec 2006 19:25:44 +0000 (19:25 +0000)
commit71b434375ccd926bd610e095901a31ff01696b7c
treeca8a396e07dee2ad42be8eab7d5520d8281b63b1
parent9430e4a9f2fce8b320791543db932fbdb69ea6ca
2006-12-06  Thomas Koenig  <Thomas.Koenig@online.de>

PR libfortran/30009
PR libfortran/30056
* gfortran.dg/read_eof_4.f90:  Add tests.
* gfortran.dg/readwrite_unf_direct_eor_1.f90:  New test.
* gfortran.dg/unf_read_corrupted_1.f90: New test.

2006-12-06  Thomas Koenig  <Thomas.Koenig@online.de>

PR libfortran/30009
PR libfortran/30056
* libgfortran.h:  Add ERROR_CORRUPT_FILE to error_codes.
* runtime/error.c (translate_error):  Add handling for
ERROR_CORRUPT_FILE.
* io/transfer.c (read_block_direct):  Add comment about
EOR for stream files.
Remove test for no bytes left for direct access files.
Generate an ERROR_SHORT_RECORD if the read was short.
For unformatted sequential files:  Check endfile condition.
Remove test for no bytes left.  End of file here means
that the file structure has been corrupted.  Pre-position
the file for the next record in case of error.
(write_buf):  Whitespace fix.  Subtract the number of bytes
written from bytes_left.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@119592 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/read_eof_4.f90
gcc/testsuite/gfortran.dg/readwrite_unf_direct_eor_1.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/unf_read_corrupted_1.f90 [new file with mode: 0644]
libgfortran/ChangeLog
libgfortran/io/transfer.c
libgfortran/libgfortran.h
libgfortran/runtime/error.c