------- Comment #6 from jvdelisle at gcc dot gnu dot org 2007-11-04 21:25 ------- OK, I have taken some time to investigate this. The problem is not MSYS specific and also occurs with Cygwin.
I do not think we can fix this. Its not a gfortran bug. The code is attempting to backspace a standard input stream. You can not seek backwards on an input stream. The code happens to work in some cases because input buffering happens to still contain the relevant data. Gfortran buffering hides the stream but you can not rely on it depending on how far you have to backspace If I modify the code slightly and open the input file directly, it works without error. This tels me its not a CR-LF issue. Any other opinions? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33863