Test case: program main integer io_unit character*80 str io_unit = 10 open (unit=io_unit,file='in',status='old',form='formatted') read (io_unit,'(A)') str read (io_unit,'()') read (io_unit,'(A)') str print *,str, "this should be the third line" close(unit=io_unit,status='keep') end
and the file named "in": first line: aaa second line:bbb third line: ccc The second read statment does not eat the second line. The output is: second line:bbb this should be the third line But if we remove the first read statement, the result is correct. IMHO this is related with null i/o list and fmt_null. This is extracted from 191.fma3d. -- Summary: NULL I/O list and Format error. Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: wf_cs at yahoo dot com CC: gcc-bugs at gcc dot gnu dot org GCC host triplet: i686-pc-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17709