Several of my progams use this method to read from the keyboard or a text file. It should read input and print it until the first character on a line is a 's'. Absoft 8.0 shows the correct response. gfortran gets a run time error reading from a file and ignores the carrage returns when reading the keyboard.
[dir:~/tests/gfortran] dir% f77 -o char3 char3.f FORTRAN 77 Compiler 8.0a, Copyright (c) 1987-2003, Absoft Corp. [dir:~/tests/gfortran] dir% char3 <in3 one two s [dir:~/tests/gfortran] dir% char3 one one two two s s [dir:~/tests/gfortran] dir% gfortran -o char3 char3.f [dir:~/tests/gfortran] dir% char3 <in3 At line 4 of file char3.f Fortran runtime error: End of file [dir:~/tests/gfortran] dir% char3 one two s s ^C [dir:~/tests/gfortran] dir% cat char3.f program main character*1 a(80) 10 continue read(5,2000)a write(6,2000)a if(a(1).ne.'s')goto 10 stop 2000 format(80a1) end [dir:~/tests/gfortran] dir% cat in3 one two s -- Summary: gfortran not correctly padding keyboard or text file input Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: dir at lanl dot gov CC: gcc-bugs at gcc dot gnu dot org GCC host triplet: powerpc-apple-darwin7.8.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20092