1 ! { dg-do run { target fd_truncate } }
2 !TODO: Move these testcases to gfortran testsuite
3 ! once compilation with pthreads is supported there
5 ! Test BACKSPACE for synchronous and asynchronous I/O
12 open (20, status='scratch', asynchronous="yes")
13 write (20,*, asynchronous="yes" ) 1
14 write (20,*, asynchronous="yes") 2
15 write (20,*, asynchronous="yes") 3
18 read (20,*, asynchronous="yes") i
24 read (20,*, asynchronous="yes") i
29 open (20, status='scratch', asynchronous="yes")
30 write (20,*, asynchronous="yes") 7
32 read (20,*, asynchronous="yes") i
37 open (20, status='scratch', form='unformatted')
48 open (3, form='unformatted', status='scratch')
49 write (3) (x(n),n=1,10)
52 read (3) (y(n),n=1,10)
55 if (abs(x(n)-y(n)) > 0.00001) STOP 5
60 open (3, form='unformatted', status='scratch')
63 write (3) n, (x(n),n=1,10)
68 read (3,end=30,err=90) n, (x(n),n=1,10)
79 read(3,end=70,err=90) n, (x(n),n=1,10)
80 if (abs(x(1) - i) .gt. 0.001) STOP 7