From: Francois-Xavier Coudert Date: Fri, 9 Sep 2005 21:51:33 +0000 (+0200) Subject: re PR libfortran/23784 (close doesn't reset ioparm on error exit) X-Git-Tag: misc/cutover-cvs2svn~697 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e0fd73d434096bcddab24fcbea3bbaebdc6652ad;p=thirdparty%2Fgcc.git 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 --- diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 6e45ee0ea29e..2008edc443c1 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,8 @@ +2005-09-09 Francois-Xavier Coudert + + PR libfortran/23784 + * io/close.c (st_close): Call library_end even in case of error. + 2005-09-09 Thomas Koenig * io/io.h: Add iomsg as last field of st_parameter. diff --git a/libgfortran/io/close.c b/libgfortran/io/close.c index 6010e921fcb7..3abacebbc399 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)