This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gfortran] patch inquire statement on open direct access file
- From: Paul Brook <paul at codesourcery dot com>
- To: fortran at gcc dot gnu dot org
- Cc: Bud Davis <bdavis9659 at comcast dot net>,"gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 2 Dec 2004 00:07:41 +0000
- Subject: Re: [gfortran] patch inquire statement on open direct access file
- Organization: CodeSourcery
- References: <1101818250.15534.7.camel@localhost.localdomain>
On Tuesday 30 November 2004 12:37, Bud Davis wrote:
> 2004-12-1 Bud Davis <bdavis9659@comcast.net>
>
> * io/inquire.c (inquire_via_unit): do not allow a direct access
> file to be opened for sequential I/O.
Ok with a few changes.
> ! check to see that you cannot open a direct access file
> ! for sequential i/o.
> ! derived from NIST test fm910.for
> CHARACTER*10 D4VK,CDIR
> CDIR = 'TEMPFILE'
> OPEN(FILE=CDIR, UNIT=7, ACCESS='DIRECT',RECL=132)
Use status='scratch' rather than an explicit filename.
> INQUIRE(UNIT=7,SEQUENTIAL=D4VK)
> CLOSE(UNIT=7,STATUS='DELETE')
> PRINT*,D4VK
Check for expected value and call abort if it's wrong.
> END
<...>
> ! // disallow an open direct access file to be accessed
> ! // sequentially
Use C /* */ comments, not C++ //
Paul