aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancois-Xavier Coudert <coudert@clipper.ens.fr>2005-09-09 23:51:33 +0200
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>2005-09-09 21:51:33 +0000
commite0fd73d434096bcddab24fcbea3bbaebdc6652ad (patch)
tree7797c1bb2fd0aec439f5a6ad8f05c12f2e6ffa00
parent9bfa80fb88707e345517a65a5697e398d674f34c (diff)
downloadgcc-e0fd73d434096bcddab24fcbea3bbaebdc6652ad.zip
gcc-e0fd73d434096bcddab24fcbea3bbaebdc6652ad.tar.gz
gcc-e0fd73d434096bcddab24fcbea3bbaebdc6652ad.tar.bz2
re PR libfortran/23784 (close doesn't reset ioparm on error exit)
PR libfortran/23784 * io/close.c (st_close): Call library_end even in case of error. From-SVN: r104108
-rw-r--r--libgfortran/ChangeLog5
-rw-r--r--libgfortran/io/close.c3
2 files changed, 8 insertions, 0 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 6e45ee0..2008edc 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,8 @@
+2005-09-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
+
+ PR libfortran/23784
+ * io/close.c (st_close): Call library_end even in case of error.
+
2005-09-09 Thomas Koenig <Thomas.Koenig@online.de>
* io/io.h: Add iomsg as last field of st_parameter.
diff --git a/libgfortran/io/close.c b/libgfortran/io/close.c
index 6010e92..3abaceb 100644
--- a/libgfortran/io/close.c
+++ b/libgfortran/io/close.c
@@ -64,7 +64,10 @@ st_close (void)
"Bad STATUS parameter in CLOSE statement");
if (ioparm.library_return != LIBRARY_OK)
+ {
+ library_end ();
return;
+ }
u = find_unit (ioparm.unit);
if (u != NULL)