aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerry DeLisle <jvdelisle@gcc.gnu.org>2006-07-31 01:32:38 +0000
committerJerry DeLisle <jvdelisle@gcc.gnu.org>2006-07-31 01:32:38 +0000
commite43c3311bdbb2fbb340c712741cb3b5a53300c7e (patch)
tree122d1918f03b564afc2512149aa256771a5b9b52
parent434fbc4b5b0bd38a97c14da717284d2ca36491cb (diff)
downloadgcc-e43c3311bdbb2fbb340c712741cb3b5a53300c7e.zip
gcc-e43c3311bdbb2fbb340c712741cb3b5a53300c7e.tar.gz
gcc-e43c3311bdbb2fbb340c712741cb3b5a53300c7e.tar.bz2
re PR fortran/28335 (flush() / write() statement on closed units - error?)
2006-07-30 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/28335 * file_position.c (st_flush): Add clearer error when UNIT does not exist. Add reference to standard in comment. From-SVN: r115835
-rw-r--r--libgfortran/ChangeLog6
-rw-r--r--libgfortran/io/file_pos.c5
2 files changed, 10 insertions, 1 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index cb4b0e3..5022e9d 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,6 +1,12 @@
2006-07-30 Jerry DeLisle <jvdelisle@gcc.gnu.org>
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 <jvdelisle@gcc.gnu.org>
+
+ PR libgfortran/28335
* close.c (st_close): Revert previous patch and add comment.
* file_position.c (st_flush): Revert previous patch and add comment.
diff --git a/libgfortran/io/file_pos.c b/libgfortran/io/file_pos.c
index c306d6e..05bb42d 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 ();
}