2 ! { dg-options "-fdump-tree-original -fcoarray=lib" }
9 integer :: stat1
, stat2
, stat3
10 character(len
=6) :: errmesg1
11 character(len
=7) :: errmesg2
12 character(len
=8) :: errmesg3
14 complex, allocatable
:: val2(:)
15 character(len
=99) :: val3
18 call co_reduce(val1
, operator
=fr
, result_image
=num_images(), stat
=stat1
, errmsg
=errmesg1
)
19 call co_reduce(val2
, operator
=gz
, result_image
=4, stat
=stat2
, errmsg
=errmesg2
)
20 call co_reduce(val3
, operator
=hc
, result_image
=res
,stat
=stat3
, errmsg
=errmesg3
)
22 pure
real function fr(x
,y
)
26 pure
complex function gz(x
,y
)
27 complex, intent(in
):: x
, y
30 pure
character(len
=99) function hc(x
,y
)
31 character(len
=99), intent(in
):: x
, y
32 hc
= x(1:50) // y(1:49)
36 ! { dg-final { scan-tree-dump-times "_gfortran_caf_co_reduce \\(&desc.., &fr, 4, _gfortran_caf_num_images \\(0, -1\\), &stat1, errmesg1, 0, 6\\);" 1 "original" } }
37 ! { dg-final { scan-tree-dump-times "_gfortran_caf_co_reduce \\(&val2, &gz, 0, 4, &stat2, errmesg2, 0, 7\\);" 1 "original" } }
38 ! { dg-final { scan-tree-dump-times "_gfortran_caf_co_reduce \\(&desc.., &hc, 1, res, &stat3, errmesg3, 99, 8\\);" 1 "original" } }
39 ! { dg-final { cleanup-tree-dump "original" } }