public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/24945] New: calling two open statements (same unit) without close fails
@ 2005-11-19 19:22 milan at cmm dot ki dot si
2005-11-19 22:32 ` [Bug libfortran/24945] " fxcoudert at gcc dot gnu dot org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: milan at cmm dot ki dot si @ 2005-11-19 19:22 UTC (permalink / raw)
To: gcc-bugs
I am trying to open the same file twice. This works in g77, but fails in
gfortran-4.1-20051112 snapshot
This is the program:
integer iun,irecl
iun=1
irecl=5
open(unit=iun,file='uu',status='unknown',access='direct',
$ form='unformatted',recl=8*irecl)
C close(unit=iun)
open(unit=iun,file='uu',status='unknown',access='direct',
$ form='unformatted',recl=8*irecl)
end
If I use close it works, but as you can guess this is a part of larger program
so I don't want to know where to put this close statement!
--
Summary: calling two open statements (same unit) without close
fails
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: milan at cmm dot ki dot si
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24945
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libfortran/24945] calling two open statements (same unit) without close fails
2005-11-19 19:22 [Bug fortran/24945] New: calling two open statements (same unit) without close fails milan at cmm dot ki dot si
@ 2005-11-19 22:32 ` fxcoudert at gcc dot gnu dot org
2005-11-20 1:16 ` kargl at gcc dot gnu dot org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2005-11-19 22:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from fxcoudert at gcc dot gnu dot org 2005-11-19 22:32 -------
Confirmed (though I don't know why it should work and how it should behave).
Intel accepts this too.
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fxcoudert at gcc dot gnu dot
| |org
OtherBugsDependingO| |19292
nThis| |
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2005-11-19 22:32:17
date| |
Version|unknown |4.2.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24945
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libfortran/24945] calling two open statements (same unit) without close fails
2005-11-19 19:22 [Bug fortran/24945] New: calling two open statements (same unit) without close fails milan at cmm dot ki dot si
2005-11-19 22:32 ` [Bug libfortran/24945] " fxcoudert at gcc dot gnu dot org
@ 2005-11-20 1:16 ` kargl at gcc dot gnu dot org
2005-11-26 8:52 ` jb at gcc dot gnu dot org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: kargl at gcc dot gnu dot org @ 2005-11-20 1:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from kargl at gcc dot gnu dot org 2005-11-20 01:16 -------
See 9.3.4 from the standard.
If a unit is connected to a file that exists, execution of an OPEN statement
for that unit is permitted. If the FILE= specifier is not included in such
an OPEN statement, the file to be connected to the unit is the same as the
file to which the unit is already connected.
If the file to be connected to the unit does not exist but is the same as
the file to which the unit is preconnected, the properties specified by
an OPEN statement become a part of the connection.
If the file to be connected to the unit is not the same as the file to
which the unit is connected, the effect is as if a CLOSE statement without
a STATUS= specifier had been executed for the unit immediately prior to th
execution of an OPEN statement.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24945
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libfortran/24945] calling two open statements (same unit) without close fails
2005-11-19 19:22 [Bug fortran/24945] New: calling two open statements (same unit) without close fails milan at cmm dot ki dot si
2005-11-19 22:32 ` [Bug libfortran/24945] " fxcoudert at gcc dot gnu dot org
2005-11-20 1:16 ` kargl at gcc dot gnu dot org
@ 2005-11-26 8:52 ` jb at gcc dot gnu dot org
2005-11-26 9:12 ` jb at gcc dot gnu dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jb at gcc dot gnu dot org @ 2005-11-26 8:52 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from jb at gcc dot gnu dot org 2005-11-26 08:52 -------
*** Bug 25036 has been marked as a duplicate of this bug. ***
--
jb at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jb at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24945
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libfortran/24945] calling two open statements (same unit) without close fails
2005-11-19 19:22 [Bug fortran/24945] New: calling two open statements (same unit) without close fails milan at cmm dot ki dot si
` (2 preceding siblings ...)
2005-11-26 8:52 ` jb at gcc dot gnu dot org
@ 2005-11-26 9:12 ` jb at gcc dot gnu dot org
2005-11-26 9:27 ` jb at gcc dot gnu dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jb at gcc dot gnu dot org @ 2005-11-26 9:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jb at gcc dot gnu dot org 2005-11-26 09:12 -------
Subject: Bug 24945
Author: jb
Date: Sat Nov 26 09:12:36 2005
New Revision: 107538
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=107538
Log:
libgfortran ChangeLog:
2005-11-26 Janne Blomqvist <jb@gcc.gnu.org>
PR libgfortran/24945
* io/open.c (edit_modes): Check for STATUS_UNKNOWN flag.
testsuite ChangeLog
2005-11-26 Janne Blomqvist <jb@gcc.gnu.org>
PR libgfortran/24945
* gfortran.dg/open_status_2.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/open_status_2.f90
Modified:
trunk/gcc/testsuite/ChangeLog
trunk/libgfortran/ChangeLog
trunk/libgfortran/io/open.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24945
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libfortran/24945] calling two open statements (same unit) without close fails
2005-11-19 19:22 [Bug fortran/24945] New: calling two open statements (same unit) without close fails milan at cmm dot ki dot si
` (3 preceding siblings ...)
2005-11-26 9:12 ` jb at gcc dot gnu dot org
@ 2005-11-26 9:27 ` jb at gcc dot gnu dot org
2005-11-26 9:32 ` jb at gcc dot gnu dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jb at gcc dot gnu dot org @ 2005-11-26 9:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from jb at gcc dot gnu dot org 2005-11-26 09:27 -------
Subject: Bug 24945
Author: jb
Date: Sat Nov 26 09:27:22 2005
New Revision: 107539
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=107539
Log:
libgfortran ChangeLog:
2005-11-26 Janne Blomqvist <jb@gcc.gnu.org>
PR libgfortran/24945
* io/open.c (edit_modes): Check for STATUS_UNKNOWN flag.
testsuite ChangeLog
2005-11-26 Janne Blomqvist <jb@gcc.gnu.org>
PR libgfortran/24945
* gfortran.dg/open_status_2.f90: New test.
Added:
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/open_status_2.f90
- copied, changed from r107538,
trunk/gcc/testsuite/gfortran.dg/open_status_2.f90
Modified:
branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
branches/gcc-4_1-branch/libgfortran/ChangeLog
branches/gcc-4_1-branch/libgfortran/io/open.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24945
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libfortran/24945] calling two open statements (same unit) without close fails
2005-11-19 19:22 [Bug fortran/24945] New: calling two open statements (same unit) without close fails milan at cmm dot ki dot si
` (4 preceding siblings ...)
2005-11-26 9:27 ` jb at gcc dot gnu dot org
@ 2005-11-26 9:32 ` jb at gcc dot gnu dot org
2005-12-04 22:39 ` jb at gcc dot gnu dot org
2005-12-12 20:15 ` pinskia at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: jb at gcc dot gnu dot org @ 2005-11-26 9:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from jb at gcc dot gnu dot org 2005-11-26 09:32 -------
Subject: Bug 24945
Author: jb
Date: Sat Nov 26 09:32:21 2005
New Revision: 107540
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=107540
Log:
testsuite ChangeLog:
2005-11-26 Janne Blomqvist <jb@gcc.gnu.org>
PR libgfortran/24945
* gfortran.dg/open_status_2.f90: Fix wrong PR number in comment.
Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/open_status_2.f90
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24945
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libfortran/24945] calling two open statements (same unit) without close fails
2005-11-19 19:22 [Bug fortran/24945] New: calling two open statements (same unit) without close fails milan at cmm dot ki dot si
` (5 preceding siblings ...)
2005-11-26 9:32 ` jb at gcc dot gnu dot org
@ 2005-12-04 22:39 ` jb at gcc dot gnu dot org
2005-12-12 20:15 ` pinskia at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: jb at gcc dot gnu dot org @ 2005-12-04 22:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from jb at gcc dot gnu dot org 2005-12-04 22:39 -------
No problems have been reported with the patch, closing the bug as fixed.
--
jb at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24945
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libfortran/24945] calling two open statements (same unit) without close fails
2005-11-19 19:22 [Bug fortran/24945] New: calling two open statements (same unit) without close fails milan at cmm dot ki dot si
` (6 preceding siblings ...)
2005-12-04 22:39 ` jb at gcc dot gnu dot org
@ 2005-12-12 20:15 ` pinskia at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-12-12 20:15 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24945
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2005-12-12 20:15 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-19 19:22 [Bug fortran/24945] New: calling two open statements (same unit) without close fails milan at cmm dot ki dot si
2005-11-19 22:32 ` [Bug libfortran/24945] " fxcoudert at gcc dot gnu dot org
2005-11-20 1:16 ` kargl at gcc dot gnu dot org
2005-11-26 8:52 ` jb at gcc dot gnu dot org
2005-11-26 9:12 ` jb at gcc dot gnu dot org
2005-11-26 9:27 ` jb at gcc dot gnu dot org
2005-11-26 9:32 ` jb at gcc dot gnu dot org
2005-12-04 22:39 ` jb at gcc dot gnu dot org
2005-12-12 20:15 ` 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).