summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/coarray_collectives_15.f90
blob: 2ddbe5a793bdf363aa862682ae1043ea422f8607 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
! { 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" } }