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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [direct_io_4.f90] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
! { dg-do run }
2
! PR 23321 : Running off the end of a file was not detected with direct I/O.
3
program main
4
  implicit none
5
  integer(kind=1) :: a, b
6
  integer :: ios, i
7
 
8
  a = 42
9
  open (unit=10,status="scratch",recl=1,access="direct")
10
  write(10,rec=1) a
11
 
12
  read (10,rec=2, iostat=ios) b
13
  if (ios == 0) call abort
14
 
15
  read (10, rec=82641, iostat=ios) b      ! This used to cause a segfault
16
  if (ios == 0) call abort
17
 
18
  read(10, rec=1, iostat=ios) b
19
  if (ios /= 0) call abort
20
  if (a /= b) call abort
21
 
22
end program main

powered by: WebSVN 2.1.0

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