Commit 8dc4d66a by Bud Davis Committed by Bud Davis

inquire.c (inquire_via_unit): do not allow a direct access file to be opened for sequential I/O.

2004-12-02  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.

        * gfortran.dg/inquire.f90: New test.

From-SVN: r91610
parent df65f093
2004-12-02 Bud Davis <bdavis9659@comcast.net>
* gfortran.dg/inquire.f90: New test.
2004-12-01 Janis Johnson <janis187@us.ibm.com>
* lib/gcc-dg.exp (dg-process-target): Wrapper for dg function to
......
! { dg-do run }
! check to see that you cannot open a direct access file
! for sequential i/o.
! derived from NIST test fm910.for
IMPLICIT NONE
CHARACTER*10 D4VK
OPEN(UNIT=7, ACCESS='DIRECT',RECL=132,STATUS='SCRATCH')
INQUIRE(UNIT=7,SEQUENTIAL=D4VK)
CLOSE(UNIT=7,STATUS='DELETE')
IF (D4VK.NE.'NO') CALL ABORT
END
2004-12-02 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.
2004-12-02 Steven G. Kargl <kargls@comcast.net>
Paul Brook <paul@codesourcery.com>
......
......@@ -73,6 +73,11 @@ inquire_via_unit (gfc_unit * u)
if (ioparm.sequential != NULL)
{
/* disallow an open direct access file to be accessed
sequentially */
if (u->flags.access==ACCESS_DIRECT)
p = "NO";
else
p = (u == NULL) ? inquire_sequential (NULL, 0) :
inquire_sequential (u->file, u->file_len);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment