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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! PR 34405 - direct access prohibits ENDFILE, BACKSPACE and REWIND
3
program test
4
  implicit none
5
  integer :: ios
6
  character(len=80) :: msg
7
  open (95, access="direct", recl=4, status="scratch")
8
  write (95,rec=1) 'abcd'
9
 
10
  ios = 0
11
  msg = " "
12
  backspace (95,iostat=ios,iomsg=msg)
13
  if (ios == 0 .or. &
14
       msg /= "Cannot BACKSPACE a file opened for DIRECT access") call abort
15
 
16
  ios = 0
17
  msg = " "
18
  endfile (95,iostat=ios,iomsg=msg)
19
  if (ios == 0 .or. &
20
       msg /= "Cannot perform ENDFILE on a file opened for DIRECT access") &
21
       call abort
22
 
23
  ios = 0
24
  msg = " "
25
  rewind (95,iostat=ios,iomsg=msg)
26
  if (ios == 0 .or. &
27
       msg /= "Cannot REWIND a file opened for DIRECT access ") call abort
28
 
29
  close (95)
30
end program test
31
 

powered by: WebSVN 2.1.0

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