[Bug libfortran/25340] Runtime error: "Read past ENDFILE record"
--- Comment #3 from fxcoudert at gcc dot gnu dot org 2006-02-04 08:36 --- Well, I'm closing this one as invalid. Steve, if you disagree, feel free to reopen it. -- fxcoudert at gcc dot gnu dot org changed: What|Removed |Added Status|WAITING |RESOLVED Resolution||INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25340
[Bug libfortran/25340] Runtime error: "Read past ENDFILE record"
--- Comment #2 from fxcoudert at gcc dot gnu dot org 2005-12-11 10:52 --- So, following Steven's question on c.l.f, this code is illegal. Most compilers report an EOF error (including Intel and g77), and branch if an END tag is present. I think the error issued by gfortran currently is better ("Read past ENDFILE record"), ie more precise. If people provide an END tag in the I/O statement, what do we want to do? I am in favour of throwing an error, and not branching silently. I know (from c.l.f) Brook thinks the same. I think we can close this as INVALID if you agree, Steven. -- fxcoudert at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |WAITING http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25340
[Bug libfortran/25340] Runtime error: "Read past ENDFILE record"
--- 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