This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/26509] incorrect behaviour of error-handler for internal read
- From: "martin at mpa-garching dot mpg dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Mar 2006 07:12:35 -0000
- Subject: [Bug fortran/26509] incorrect behaviour of error-handler for internal read
- References: <bug-26509-11277@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #12 from martin at mpa-garching dot mpg dot de 2006-03-09 07:12 -------
(In reply to comment #11)
> OK, after some discussion on comp.lang.fortran it is clear tha END and EOR are
> not error conditions. They are there to allow for example, reading in a loop
> until the end of a file is reached and branching out. A true error condition
> would be something like a disk failure and the like.
>
> So, if an application is anticipating hitting the End-of-File deliberately then
> use the END parameter. Likewise for EOR.
I agree completely for the reading case. But if I have a file open for writing
and try to write 8 bytes into a 4-byte record, shouldn't we jump to the ERR=
label? Unfortunately there is no support for EOR= in WRITE statements.
This feels a bit like an inconsistency in the standard.
> The most portable method to handle things is to use IOSTAT and test for the
> conditions of interest.
Yes, I think I'll suggest this to the Starlink people.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26509