This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/34411] hang-up during read of non-expected input



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]