gcc/testsuite/gfortran.dg/coarray_collectives_15.f90
raw| 1 | ! { dg-do compile } |
| 2 | ! { dg-options "-fdump-tree-original -fcoarray=single" } |
| 3 | ! |
| 4 | ! CO_REDUCE |
| 5 | ! |
| 6 | program test |
| 7 | implicit none |
| 8 | intrinsic co_reduce |
| 9 | integer :: stat1 |
| 10 | real :: val |
| 11 | call co_reduce(val, valid, result_image=1, stat=stat1) |
| 12 | contains |
| 13 | pure real function valid(x,y) |
| 14 | real, value :: x, y |
| 15 | valid = x * y |
| 16 | end function valid |
| 17 | end program test |
| 18 | |
| 19 | ! { dg-final { scan-tree-dump-times "stat1 = 0;" 1 "original" } } |