https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61632
--- Comment #17 from Steve Kargl <sgk at troutmask dot apl.washington.edu> --- On Tue, Jul 15, 2014 at 09:08:44AM +0000, dominiq at lps dot ens.fr wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61632 > > --- Comment #15 from Dominique d'Humieres <dominiq at lps dot ens.fr> --- > > Its sort of like Steve said earlier. The coder is choosing to ignore an > > error condition so anything gfortran does is valid. In this case the > > output got writen to buffer before the error occurred. You are bypassing > > all of the normal error handling when you do this. The buffer got flushed. > > > > Its not worth the time to change any of it really. > > > > The program should exit, its invalid. > > Well, I disagree with this interpretation: I did not find anywhere in the > standard that the variable set by iostat has to be used. I did not say that iostat had to be used. However, one can find things like: 9.10.1 Error conditions and the ERR= specifier If an error condition occurs during execution of an input/output statement, the position of the file becomes indeterminate. 9.2.3.3 File position after data transfer If an error condition (9.10) occurred, the position of the file is indeterminate. If one explicitly uses IOSTAT= in an IO statement, it may be prudent to actually check its value.