]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR libfortran/23784 (close doesn't reset ioparm on error exit)
authorFrancois-Xavier Coudert <coudert@clipper.ens.fr>
Fri, 9 Sep 2005 21:51:33 +0000 (23:51 +0200)
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Fri, 9 Sep 2005 21:51:33 +0000 (21:51 +0000)
PR libfortran/23784
* io/close.c (st_close): Call library_end even in case of error.

From-SVN: r104108

libgfortran/ChangeLog
libgfortran/io/close.c

index 6e45ee0ea29eaf06f81098ffcc14656fb9c3f6e4..2008edc443c162d958a8a98a908b77b3d76ffa71 100644 (file)
@@ -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.
index 6010e921fcb7ae47caadb1fa9d8409ad3967e336..3abacebbc399e7969c345045e46206172ac5330a 100644 (file)
@@ -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)