diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index cb4b0e39bb4..5022e9d252c 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,9 @@ +2006-07-30 Jerry DeLisle + + PR libgfortran/28335 + * file_position.c (st_flush): Add clearer error when UNIT does not + exist. Add reference to standard in comment. + 2006-07-30 Jerry DeLisle PR libgfortran/28335 diff --git a/libgfortran/io/file_pos.c b/libgfortran/io/file_pos.c index c306d6e8d73..05bb42dc804 100644 --- a/libgfortran/io/file_pos.c +++ b/libgfortran/io/file_pos.c @@ -340,7 +340,10 @@ st_flush (st_parameter_filepos *fpp) flush (u->s); unlock_unit (u); } + else + /* FLUSH on unconnected unit is illegal: F95 std., 9.3.5. */ + generate_error (&fpp->common, ERROR_BAD_OPTION, + "Specified UNIT in FLUSH is not connected"); - /* CLOSE on unconnected unit is legal and a no-op: F95 std., 9.3.5. */ library_end (); }