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/44477] Sequential I/O with END FILE: File position should be at EoF



------- Comment #2 from burnus at gcc dot gnu dot org  2010-06-09 19:41 -------
(In reply to comment #1)
> As I read this, the test case is invalid since it does not have a rewind or
> backspace before the write?

Yes - I expect that gfortran should issue an EOR error instead of happily
accepting an I/O transfer.


> If we want to change this to be an intended extension, I suppose we should
> issue a warning or error for -std= ?

Well, I think we can do two things:

a) Keep the current status and claim it is an extension
b) Change it to match NAG f95 and Pathscale and print a run-time EoF error. (Or
the equivalent for ERR=/IOSTAT=/IOMSG=.)

I do not think that it makes sense to allow it for -std=(gnu/legacy) and not
for -std=f(95/2003/2008).

As Pathscale prints an error, there is hope that not too many programs rely on
having no BACKSPACE/REWIND.


Error: Pathscale 3.2.99, NAG f95 v5.1, Open64 4.2

No error: ifort 11.1, gfortran, g95, sunf95 8.3 (sunstudio12), Portland's pgf90
v6.2 and v10.3.
(No idea what g77 did.)


-- 


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


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