[Bug libfortran/30009] Unformatted reads exceeding storage units gives EOF instead of ERR

tkoenig at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sun Dec 3 14:06:00 GMT 2006



------- Comment #7 from tkoenig at gcc dot gnu dot org  2006-12-03 14:06 -------
(In reply to comment #6)
> For
>        READ(1,ERR=10) J ! Read beyond EOF
> there are two possible implementations one finds:
>   ifort: forrtl: severe (24): end-of-file during read

Really?  With ifort 8.1, I get

$ cat end-of-file.f
       WRITE(1) 1
       REWIND(1)
       READ(1) I
       READ(1,END=10) J
       print *,"no error"
       stop
 10    print *,"error value"
       end

$ ifort -v && ifort end-of-file.f && ./a.out
Version 8.1
 error value

I do think this is the correct behavior, and I'll take care
to maintain this behavior.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30009



More information about the Gcc-bugs mailing list