public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libfortran/23784] New: close doesn't reset ioparm on error exit
@ 2005-09-08 20:07 tkoenig at gcc dot gnu dot org
2005-09-09 16:00 ` [Bug libfortran/23784] " fxcoudert at gcc dot gnu dot org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2005-09-08 20:07 UTC (permalink / raw)
To: gcc-bugs
$ cat close.f90
program main
close(10, status="whatever", iostat=i)
print *,"Hello"
end program main
$ gfortran close.f90
$ ./a.out
At line 3 of file close.f90
Internal Error: Recursive library calls not allowed
$ gfortran -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.1/configure --prefix=/home/ig25 --enable-languages=c,f95
Thread model: posix
gcc version 4.1.0 20050908 (experimental)
--
Summary: close doesn't reset ioparm on error exit
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P2
Component: libfortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tkoenig at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23784
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libfortran/23784] close doesn't reset ioparm on error exit
2005-09-08 20:07 [Bug libfortran/23784] New: close doesn't reset ioparm on error exit tkoenig at gcc dot gnu dot org
@ 2005-09-09 16:00 ` fxcoudert at gcc dot gnu dot org
2005-09-09 21:51 ` cvs-commit at gcc dot gnu dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2005-09-09 16:00 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From fxcoudert at gcc dot gnu dot org 2005-09-09 16:00 -------
It's just that we should call library_end() before returning in st_close:
Index: libgfortran/io/close.c
===================================================================
RCS file: /cvs/gcc/gcc/libgfortran/io/close.c,v
retrieving revision 1.8
diff -p -u -r1.8 close.c
--- libgfortran/io/close.c 27 Aug 2005 16:01:54 -0000 1.8
+++ libgfortran/io/close.c 9 Sep 2005 15:59:16 -0000
@@ -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)
No time to regtest this, but if someone want to test & commit as obvious, he can
gladly take credit for this genial patch :)
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |fxcoudert at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |patch
Last reconfirmed|0000-00-00 00:00:00 |2005-09-09 16:00:35
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23784
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libfortran/23784] close doesn't reset ioparm on error exit
2005-09-08 20:07 [Bug libfortran/23784] New: close doesn't reset ioparm on error exit tkoenig at gcc dot gnu dot org
2005-09-09 16:00 ` [Bug libfortran/23784] " fxcoudert at gcc dot gnu dot org
@ 2005-09-09 21:51 ` cvs-commit at gcc dot gnu dot org
2005-09-09 21:52 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-09-09 21:51 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-09-09 21:51 -------
Subject: Bug 23784
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: fxcoudert@gcc.gnu.org 2005-09-09 21:51:33
Modified files:
libgfortran : ChangeLog
libgfortran/io : close.c
Log message:
PR libfortran/23784
* io/close.c (st_close): Call library_end even in case of error.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/ChangeLog.diff?cvsroot=gcc&r1=1.299&r2=1.300
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/io/close.c.diff?cvsroot=gcc&r1=1.8&r2=1.9
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23784
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libfortran/23784] close doesn't reset ioparm on error exit
2005-09-08 20:07 [Bug libfortran/23784] New: close doesn't reset ioparm on error exit tkoenig at gcc dot gnu dot org
2005-09-09 16:00 ` [Bug libfortran/23784] " fxcoudert at gcc dot gnu dot org
2005-09-09 21:51 ` cvs-commit at gcc dot gnu dot org
@ 2005-09-09 21:52 ` cvs-commit at gcc dot gnu dot org
2005-09-09 22:03 ` fxcoudert at gcc dot gnu dot org
2005-09-10 5:06 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-09-09 21:52 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-09-09 21:52 -------
Subject: Bug 23784
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-4_0-branch
Changes by: fxcoudert@gcc.gnu.org 2005-09-09 21:52:12
Modified files:
libgfortran : ChangeLog
libgfortran/io : close.c
Log message:
PR libfortran/23784
* io/close.c (st_close): Call library_end even in case of error.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.163.2.89&r2=1.163.2.90
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/io/close.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5.12.1&r2=1.5.12.2
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23784
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libfortran/23784] close doesn't reset ioparm on error exit
2005-09-08 20:07 [Bug libfortran/23784] New: close doesn't reset ioparm on error exit tkoenig at gcc dot gnu dot org
` (2 preceding siblings ...)
2005-09-09 21:52 ` cvs-commit at gcc dot gnu dot org
@ 2005-09-09 22:03 ` fxcoudert at gcc dot gnu dot org
2005-09-10 5:06 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2005-09-09 22:03 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From fxcoudert at gcc dot gnu dot org 2005-09-09 22:03 -------
Fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23784
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libfortran/23784] close doesn't reset ioparm on error exit
2005-09-08 20:07 [Bug libfortran/23784] New: close doesn't reset ioparm on error exit tkoenig at gcc dot gnu dot org
` (3 preceding siblings ...)
2005-09-09 22:03 ` fxcoudert at gcc dot gnu dot org
@ 2005-09-10 5:06 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-10 5:06 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.0.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23784
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-09-10 5:06 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-08 20:07 [Bug libfortran/23784] New: close doesn't reset ioparm on error exit tkoenig at gcc dot gnu dot org
2005-09-09 16:00 ` [Bug libfortran/23784] " fxcoudert at gcc dot gnu dot org
2005-09-09 21:51 ` cvs-commit at gcc dot gnu dot org
2005-09-09 21:52 ` cvs-commit at gcc dot gnu dot org
2005-09-09 22:03 ` fxcoudert at gcc dot gnu dot org
2005-09-10 5:06 ` pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).