2 ! { dg-options "-fdump-tree-original -fcoarray=lib" }
7 integer :: me
[*],tmp
,stat
,stat2
,next
11 if(me
== num_images()) next
= 1
16 if(stat
/= 0) write(*,*) 'Image failed during sync'
20 tmp
= func(me
[4,stat
=stat
])
21 if(stat
/= 0) write(*,*) me
,'failure in func arg'
23 tmp
= func2(me
[1,stat
=stat2
],me
[3,stat
=stat
])
24 if(stat2
/= 0 .or
. stat
/= 0) write(*,*) me
,'failure in func2 args'
29 function func(remote_me
)
35 function func2(remote_me
,remote_neighbor
)
37 integer remote_me
,remote_neighbor
38 func2
= remote_me
+ remote_neighbor
41 end program function_stat
43 ! { dg-final { scan-tree-dump-times "_gfortran_caf_get \\\(caf_token.0, \\\(integer\\\(kind=\[48\]\\\)\\\) desc.\[0-9\]+.data - \\\(integer\\\(kind=\[48\]\\\)\\\) me, 4, &desc.\[0-9\]+, 0B, &desc.\[0-9\]+, 4, 4, 0, &stat\\\);" 1 "original" } }
44 ! { dg-final { scan-tree-dump-times "_gfortran_caf_get \\\(caf_token.0, \\\(integer\\\(kind=\[48\]\\\)\\\) desc.\[0-9\]+.data - \\\(integer\\\(kind=\[48\]\\\)\\\) me, 1, &desc.\[0-9\]+, 0B, &desc.\[0-9\]+, 4, 4, 0, &stat2\\\);" 1 "original" } }
45 ! { dg-final { scan-tree-dump-times "_gfortran_caf_get \\\(caf_token.0, \\\(integer\\\(kind=\[48\]\\\)\\\) desc.\[0-9\]+.data - \\\(integer\\\(kind=\[48\]\\\)\\\) me, 3, &desc.\[0-9\]+, 0B, &desc.\[0-9\]+, 4, 4, 0, &stat\\\);" 1 "original" } }