aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/gomp/scan-3.f90
blob: 83181666462c3d04f4927d546a6a2c46116e6479 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
! { dg-do compile }
! { dg-additional-options "-fdump-tree-original" }

module m
  integer :: a, b
end module m

subroutine f1 (c, d)
  use m
  implicit none
  integer i, c(*), d(*)
  !$omp do reduction (inscan, +: a)
  do i = 1, 64
    d(i) = a
    !$omp scan inclusive (a)
    a = a + c(i)
  end do
end

! { dg-final { scan-tree-dump-times "#pragma omp for reduction\\(inscan,\\\+:a\\)" 1 "original" } }
! { dg-final { scan-tree-dump-times "#pragma omp scan inclusive\\(a\\)" 1 "original" } }