PR ipa/83051
[official-gcc.git] / gcc / testsuite / gfortran.dg / coarray_stat_2.f90
blob9eed860ea5731ca26fdafeb0a6885ff5b136c022
1 ! { dg-do run }
2 ! { dg-options "-fcoarray=lib -lcaf_single" }
3 ! { dg-additional-options "-latomic" { target libatomic_available } }
5 ! Support for stat= in caf reference
7 program whitespace
8 implicit none
10 integer :: me[*],tmp,stat
12 me = this_image()
13 stat = 0
15 sync all(stat = stat)
17 if(stat /= 0) write(*,*) 'failure during sync'
19 stat = 42
21 tmp = me[num_images(),stat = stat]
22 if(stat /= 0) call abort()
24 end program whitespace