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/32235] gfortran - incorrectly position text file after backspace



------- Comment #4 from jvdelisle at gcc dot gnu dot org  2007-06-09 19:27 -------
There are a couple of issues going on here.  First, if the input file is a
regular file which is seekable, gfortran is indeed giving the wrong result. 
This is because the endfile condition was not being set after an EOF error
condition which is trapped in "subroutine inlist".  This is easily fixed. (I
have the patch tested)

The second issue is that when using redirection with standard input, the file
is not seekable and the results may depend on the underlying OS and buffering.
I suspect that if you back spaced enough under the right conditions you would
exhaust the buffer as you go back and will eventually fail.   I will be giving
this second issue some more thought. Especially since it works on g77 for at
least the simple caee of a few backspaces.  


-- 


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


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