This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/30009] New: Unformatted reads exceeding one record should use the next record not give EOF
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Nov 2006 21:34:22 -0000
- Subject: [Bug libfortran/30009] New: Unformatted reads exceeding one record should use the next record not give EOF
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
See http://gcc.gnu.org/ml/fortran/2006-11/msg00708.html
Reported by Chris Talley.
Tested with current 4.3 and also with 4.1.
Testcase, see URL; essential parts of the test case (form="unformatted"):
WRITE(1) 1
WRITE(1) 2, 3, 4
WRITE(1) 5, 6, 7
REWIND(1)
READ(1,ERR=10) I,J,K
The read should read "1" of the first record and then "2" and "3" of the second
record. gfortran however reads "1", hits then the end of the record and gives
an end-of-file error.
Note that none of the end-of-file conditions given in 9.10 of Fortran 2003 (cf.
also 9.4.1.5f. of Fortran 95) is met. Note further that an end-of-record
condition cannot occure for unformatted files.
--
Summary: Unformatted reads exceeding one record should use the
next record not give EOF
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: libfortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30009