aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/libgfortran.h
diff options
context:
space:
mode:
authorThomas Koenig <Thomas.Koenig@online.de>2006-12-06 19:25:44 +0000
committerThomas Koenig <tkoenig@gcc.gnu.org>2006-12-06 19:25:44 +0000
commitb4c811bd14e0b3ea5a995b711aae60ee1d3daaab (patch)
treeca8a396e07dee2ad42be8eab7d5520d8281b63b1 /libgfortran/libgfortran.h
parent0307c64eea66674bd3dd9a42fed80cf748e2acf8 (diff)
downloadgcc-b4c811bd14e0b3ea5a995b711aae60ee1d3daaab.zip
gcc-b4c811bd14e0b3ea5a995b711aae60ee1d3daaab.tar.gz
gcc-b4c811bd14e0b3ea5a995b711aae60ee1d3daaab.tar.bz2
re PR libfortran/30009 ([4.1 only] Unformatted reads exceeding storage units gives EOF instead of ERR)
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. From-SVN: r119592
Diffstat (limited to 'libgfortran/libgfortran.h')
-rw-r--r--libgfortran/libgfortran.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/libgfortran/libgfortran.h b/libgfortran/libgfortran.h
index 644a0ad..c6b31ed 100644
--- a/libgfortran/libgfortran.h
+++ b/libgfortran/libgfortran.h
@@ -416,6 +416,7 @@ typedef enum
ERROR_ALLOCATION,
ERROR_DIRECT_EOR,
ERROR_SHORT_RECORD,
+ ERROR_CORRUPT_FILE,
ERROR_LAST /* Not a real error, the last error # + 1. */
}
error_codes;