The diagnostics for the options of OPEN, INQUIRE, WRITE, READ and potentially also CLOSE could be improved. Currently, gfortran only prints "SYNTAX ERROR" for:
inquire(99, pad=3) ! wrong, need CHARACTER variable not INTEGER literal inquire(99, pad='aaa') ! wrong, need variable end NAG f95 has a better message: Error: aa.f90, line 1: Expected a CHARACTER item for i/o keyword PAD Error: aa.f90, line 2: Item for i/o keyword PAD is not a variable As had ifort: fortcom: Error: aa.f90, line 1: A scalar default-character variable is required in this context. [3] inquire(99, pad=3) ! wrong, need CHARACTER not INTEGER ----------------^ fortcom: Error: aa.f90, line 2: A scalar default-character variable is required in this context. ['aaa'] inquire(99, pad='aaa') ! wrong, need Variable ----------------^ -- Summary: Better error message for wrong arguments to I/O statements Product: gcc Version: 4.4.0 Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P3 Component: fortran 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=35832