------- Comment #1 from kargl at gcc dot gnu dot org 2005-12-10 16:55 ------- What is the bug?
9.4.1.6 End-of-file branch If an end-of-file condition (9.4.3) occurs and no error condition (9.4.3) occurs during execution of an input statement that contains an END= specifier (1) Execution of the input statement terminates, (2) If the file specified in the input statement is an external file, it is positioned after the endfile record. So, after the first read(11,end=1008), the file is positioned "after the endfile record." Your second read(11,end=1011) is reading past the ENDFILE record, which is what the runtime error says. Now, if your second read statement had been read(11,err=1011), then everything should work out. -- kargl at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kargl at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25340