2 ! { dg-options "-std=legacy" }
6 ! reading a direct access record after it was written did
7 ! not always return the correct data.
13 parameter (strlen
= 4)
19 open (UNIT
=iunit
,FORM
='unformatted',ACCESS
='direct',RECL
=strlen
)
20 write (iunit
, rec
=1) 'ABCD'
21 read (iunit
, rec
=1) string
22 close (iunit
, status
= 'delete')
23 if (string
.ne
.'ABCD') call abort
25 open (UNIT
=iunit
,FORM
='unformatted',ACCESS
='direct',STATUS
='scratch',RECL
=strlen
)
26 write (iunit
, rec
=1) 'ABCD'
27 read (iunit
, rec
=1) string
29 if (string
.ne
.'ABCD') call abort