Debian Codegraph @

gcc/testsuite/gfortran.dg/coarray_stat_whitespace.f90

raw
1 ! { dg-do compile }
2 ! { dg-options "-fcoarray=lib" }
3 !
4 ! Support for stat= in caf reference
5 !
6 program whitespace
7 implicit none
8
9 integer :: me[*],tmp,stat,i
10
11 me = this_image()
12 stat = 0
13 i = 1
14
15 sync all(stat = stat)
16
17 if(stat /= 0) write(*,*) 'failure during sync'
18
19 stat = 0
20
21 if(me == 1) then
22 tmp = me[num_images(),stat = stat]
23 if(stat /= 0) write(*,*) 'failure in img:',me
24 else if(me == 2) then
25 tmp = me[i,stat=stat]
26 if(stat /= 0) write(*,*) 'failure in img:',me
27 endif
28
29 end program whitespace