------- Comment #3 from kargl at gcc dot gnu dot org 2010-07-14 18:21 ------- (In reply to comment #2) > The original code has a line > > REWIND I04 > > after > > > ENDFILE I04 > > I have removed it to reduce the test, but adding it does not change the > runtime > error. Also I doubt that the NIST suite contains invalid code. Apparently > ENDFILE opens the file as formatted. >
Even with the rewind statement, the code may still be invalid. See "9.4.3 Connection of a file to a unit" in F2003, and also see "9.7.2 ENDFILE statement". ENDFILE only operates on connected files. The unit number I04 in your example is not connected to a file at the point of execution. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44934