This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/20661] End of record not detected
- From: "tobi 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 Mar 2005 17:48:22 -0000
- Subject: [Bug libfortran/20661] End of record not detected
- References: <20050327215956.20661.kargl@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From tobi at gcc dot gnu dot org 2005-03-28 17:48 -------
To clarify this:
! End of record is not detected
! on second READ
! iostats should be 0, 0, -2, -1
The standard says:
"Execution of an input/output statement containing the IOSTAT= specifier causes
the variable specified in the IOSTAT= specifier to become defined
(1) With a zero value if neither an error condition, and end-of-file condition,
nor an end-of-record condition occurs,
(2) With a processor-dependent positive integer value if an error condition occurs,
(3) With a processor-dependent negative integer value if an end-of-ile condition
occurs and no error condition occurs, or
(4) With a processor-dependent negative integer value different from the
end-of-file value if and end-of-record condition occurs and no error condition
or end-of-file condition occurs.
Current output from gfortran:
iostat 0
iostat 0 x
iostat 0
iostat -1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20661