This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/34795] inquire statement , direct= specifier incorrectly returns YES
- From: "jvdelisle at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Jan 2008 15:31:33 -0000
- Subject: [Bug fortran/34795] inquire statement , direct= specifier incorrectly returns YES
- References: <bug-34795-15636@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from jvdelisle at gcc dot gnu dot org 2008-01-19 15:31 -------
Not that this reference is always right, but Metcalf, Reid, and Cohen state:
direct=dir where dir "... are character variables that are assigned the value
YES, NO, or UNKNOWN, depending on whether the file may be opened for ... direct
access ... or whether this can not be determined.
To me, key here is "may be opened" which implies the file is not open yet. So,
if the file has been opened already,its nonsense to use inquire this way, but
the answer is obviously NO for a file opened for sequential. The standard
could be improved by addressing this case where the file is already opened.
So based on that, I agree we change gfortran.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34795