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 15:11:08 -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 #14 from martin at mpa-garching dot mpg dot de 2006-03-09 15:11 -------
(In reply to comment #13)
> If it is DIRECT I/O you are doing, this is a different story and record sizes
> are fixed length.
Yes, that's what I'm talking about. Consider:
PROGRAM TESTRECL
IMPLICIT NONE
OPEN(UNIT = 10, FILE = 'test', FORM = 'UNFORMATTED',
: ACCESS = 'DIRECT', RECL = 4, ERR = 101)
WRITE(UNIT=10,REC=1,ERR=101) 1d0
PRINT *,"no error detected"
GOTO 102
101 PRINT *,"error detected"
102 CONTINUE
CLOSE(UNIT=10, STATUS='DELETE')
END
~/tmp>gfortran test3.f
~/tmp>./a.out
At line 7 of file test3.f
Fortran runtime error: End of record
All I'm saying is that in this situation there seems to be no way to jump
to some label if something goes wrong (because there is no EOR parameter
for WRITE).
But I agree that this is not gfortran's problem, but rather
an inconsistency in the standard.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26509