! echo "z" > foo.dat program test implicit none integer :: i open(99,file="foo.dat") read(99,*) i print *, i end program
gfortran: At line 5 of file x.f90 Fortran runtime error: Bad integer for item 1 in list input Expected: gfortran prints out the filename and/or unit as other compilers do; especially useful for users which don't have the source code. g95: At line 5 of file x.f90 (Unit 99 "foo.dat") Fortran runtime error: Bad integer for item 1 in list input NAG f95: Invalid input for integer editing Program terminated by I/O error on unit 99 (File="foo.dat",Formatted,Sequential) ifort: forrtl: severe (59): list-directed I/O syntax error, unit 99, file /dev/shm/foo.dat sunf95: Error 1083: unexpected character in integer value Location: the READ statement at line 5 of "x.f90" Unit: 99 File: foo.dat Input: z For stdin * they show (g95,NAG f95, ifort, sunf95): At line 4 of file x.f90 (Unit 5) Program terminated by I/O error on unit 5 (Input_Unit,Formatted,Sequential) forrtl: severe (59): list-directed I/O syntax error, unit -4, file /dev/pts/0 Unit: * File: standard input -- Summary: IO error message should show Unit/Filename Product: gcc Version: 4.3.0 Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P3 Component: libfortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: burnus at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32456