This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/14836] New: [gfortran] INQUIRE specifier NEXTREC not correct for direct access files
- From: "bdavis9659 at comcast dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Apr 2004 15:06:43 -0000
- Subject: [Bug libfortran/14836] New: [gfortran] INQUIRE specifier NEXTREC not correct for direct access files
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
>From NIST test FM917.FOR
$ cat c.f
OPEN(UNIT=9, ACCESS='DIRECT', RECL=80, FORM='UNFORMATTED')
INQUIRE(UNIT=9,NEXTREC=NREC)
WRITE(UNIT=9,REC=5) 1
INQUIRE(UNIT=9,NEXTREC=NREC)
PRINT*,NREC
! IF (NREC.NE.6) CALL ABORT
READ(UNIT=9,REC=1) MVI
INQUIRE(UNIT=9,NEXTREC=NREC)
! IF (NREC.NE.2) CALL ABORT
PRINT*,NREC
END
$ gfortran c.f
$ ./a.out
2
3
$ g77 c.f
$ ./a.out
6
2
$ gfortran --version
GNU Fortran 95 (GCC 3.5-tree-ssa 20040401 (merged 20040324))
--
Summary: [gfortran] INQUIRE specifier NEXTREC not correct for
direct access files
Product: gcc
Version: tree-ssa
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libfortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bdavis9659 at comcast dot net
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14836