OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [pr16597.f90] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! { dg-options "-std=legacy" }
3
!
4
! pr 16597
5
! libgfortran
6
! reading a direct access record after it was written did
7
! not always return the correct data.
8
 
9
      program gfbug4
10
      implicit none
11
 
12
      integer      strlen
13
      parameter    (strlen = 4)
14
 
15
      integer      iunit
16
      character    string *4
17
 
18
      iunit = 99
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)
23
      if (string.ne.'ABCD') call abort
24
 
25
      open (UNIT=iunit,FORM='unformatted',ACCESS='direct',STATUS='scratch',RECL=strlen)
26
      write (iunit, rec=1) 'ABCD'
27
      read (iunit, rec=1) string
28
      close (iunit)
29
      if (string.ne.'ABCD') call abort
30
      end

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.