diff options
author | fxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-29 08:37:32 +0000 |
---|---|---|
committer | fxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-29 08:37:32 +0000 |
commit | cb09492adbe1e4187a6b9f80afdb8bc9637543b1 (patch) | |
tree | fc392638f57c476781c2ab631e8a4d1b41398da1 /libgfortran | |
parent | 9c9b332fb841e607ed4eec768e2de678538f9d59 (diff) | |
download | gcc-cb09492adbe1e4187a6b9f80afdb8bc9637543b1.tar.gz |
PR libfortran/20163
* io/open.c (st_open): call library_end() before returning even if
an error arises.
* gfortran.dg/pr20163-2.f: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97153 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran')
-rw-r--r-- | libgfortran/ChangeLog | 7 | ||||
-rw-r--r-- | libgfortran/io/open.c | 3 |
2 files changed, 10 insertions, 0 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 32b5454827b..edc23af6ce9 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,10 @@ +2005-03-29 Dale Ranta <dir@lanl.gov> + Francois-Xavier Coudert <coudert@clipper.ens.fr> + + PR libfortran/20163 + * io/open.c (st_open): call library_end() before returning even if + an error arises. + 2005-03-25 Francois-Xavier Coudert <coudert@clipper.ens.fr> PR libfortran/19678 diff --git a/libgfortran/io/open.c b/libgfortran/io/open.c index 3d0e5bebe7a..82a862b7c47 100644 --- a/libgfortran/io/open.c +++ b/libgfortran/io/open.c @@ -481,7 +481,10 @@ st_open (void) flags.position = POSITION_ASIS; if (ioparm.library_return != LIBRARY_OK) + { + library_end (); return; + } u = find_unit (ioparm.unit); |