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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [direct_io_1.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
! PR 16908
3
! Segfaulted on second set of writes.  We weren't handling partial records
4
! properly when calculating the file position.
5
program direct_io_1
6
  implicit none
7
 
8
  integer n, nt, mt, m
9
  real dt, tm, w
10
  real, allocatable :: p(:)
11
 
12
  nt =  2049 ! if nt < 2049, then everything works.
13
 
14
  allocate(p(nt))
15
  p  = 0.e0
16
 
17
  inquire(iolength=mt) (p(m), m=1, nt)
18
 
19
  open(unit=12, file='syn.sax', access='direct', recl=mt)
20
  n = 1
21
  write(12, rec=n) mt, nt
22
  write(12, rec=n+1) (p(m), m=1, nt)
23
  close(12)
24
 
25
  inquire(iolength=mt) (p(m), m=1, nt)
26
 
27
  open(unit=12, file='syn.sax', access='direct', recl=mt)
28
  n = 1
29
  write(12, rec=n) mt, nt
30
  write(12, rec=n+1) (p(m), m=1, nt)
31
  close(12, status='delete')
32
end program

powered by: WebSVN 2.1.0

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