From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12763 invoked by alias); 28 Nov 2006 21:34:33 -0000 Received: (qmail 12697 invoked by uid 48); 28 Nov 2006 21:34:22 -0000 Date: Tue, 28 Nov 2006 21:34:00 -0000 Subject: [Bug libfortran/30009] New: Unformatted reads exceeding one record should use the next record not give EOF X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "burnus at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-11/txt/msg02419.txt.bz2 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