summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/goacc/private-3.f95
blob: aa12a56f110a96de90f5f2052169fa540c55a962 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
! { dg-do compile }

! test for private variables in a reduction clause

program test
  implicit none
  integer, parameter :: n = 100
  integer :: i, k

!  FIXME: This causes an ICE in the gimplifier.
!  !$acc parallel private (k) reduction (+:k)
!  do i = 1, n
!     k = k + 1
!  end do
!  !$acc end parallel

  !$acc parallel private (k)
  !$acc loop reduction (+:k)
  do i = 1, n
     k = k + 1
  end do
  !$acc end parallel
end program test