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

! { dg-final { scan-tree-dump-times "stat1 = 0;" 1 "original" } }
! { dg-final { cleanup-tree-dump "original" } }