Debian Codegraph @

libgomp/testsuite/libgomp.fortran/async_io_6.f90

raw
1 ! { dg-do run }
2 !TODO: Move these testcases to gfortran testsuite
3 ! once compilation with pthreads is supported there
4 ! PR 22390 Implement flush statement
5 program flush_1
6
7 character(len=256) msg
8 integer ios
9
10 open (unit=10, access='SEQUENTIAL', status='SCRATCH')
11
12 write (10, *) 42
13 flush 10
14
15 write (10, *) 42
16 flush(10)
17
18 write (10, *) 42
19 flush(unit=10, iostat=ios)
20 if (ios /= 0) stop 1
21
22 write (10, *) 42
23 flush (unit=10, err=20)
24 goto 30
25 20 stop 2
26 30 continue
27
28 call flush(10)
29
30 end program flush_1