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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [pr16597.f90] - Blame information for rev 154

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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