This program writes one word and then reads two words. g77 finds the error but gfortran does not -
[dranta:~/tests/gfortran-D] dir% gfortran -o read01 read01.f [dranta:~/tests/gfortran-D] dir% read01 [dranta:~/tests/gfortran-D] dir% cat read01.f program test integer i1,i2 open(unit=11,form='unformatted') write(11)i1 close(11,status='keep') open(unit=11,form='unformatted') rewind 11 read(11)i1,i2 close(11,status='delete') stop end[dranta:~/tests/gfortran-D] dir% gfortran --v Using built-in specs. Target: powerpc-apple-darwin8.6.0 Configured with: ../gcc/configure --prefix=/Users/dir/gfortran --enable-languages=c,f95 Thread model: posix gcc version 4.2.0 20060511 (experimental) [dranta:~/tests/gfortran-D] dir% g77 -o read01 read01.f [dranta:~/tests/gfortran-D] dir% read01 do_us: off end of record apparent state: unit 11 named fort.11 lately reading sequential unformatted external IO Abort [dranta:~/tests/gfortran-D] dir% -- Summary: gfortran - does not generate error when trying to read too much data Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libfortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: dir at lanl dot gov GCC target triplet: powerpc-apple-darwin8.6.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27575