This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/34411] hang-up during read of non-expected input
- From: "jvdelisle at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Dec 2007 02:16:45 -0000
- Subject: [Bug fortran/34411] hang-up during read of non-expected input
- References: <bug-34411-15493@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from jvdelisle at gcc dot gnu dot org 2007-12-10 02:16 -------
First, you are relying on non-portable behavior:
F95 Standard 9.4.1.5 Error branch - subpart (2)->
"The position of the file specified in the input/output statement becomes
indeterminate"
So gfortran does not try to change the file position after the read and the
subsequent reads continue to read bad values and ad-infinitum. The loop is in
your program.
Second, as a Quality of Implementation issue, and under these conditions we can
do whatever we want, I have a patch testing that moves the file to the next
record position. :)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34411