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 5program 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 2520 STOP 2 2630 continue 27 28 call flush(10) 29 30end program flush_1 31