summaryrefslogtreecommitdiff
path: root/libgomp/testsuite/libgomp.oacc-fortran/collapse-3.f90
blob: 50e6100a1a0f09808a132cbc96d61d24f4a33853 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
! { dg-do run }

program collapse3
  integer :: a(3,3,3), k, kk, kkk, l, ll, lll
  !$acc parallel
  !$acc loop collapse(3)
    do 115 k=1,3
dokk: do kk=1,3
        do kkk=1,3
          a(k,kk,kkk) = 1
        enddo
      enddo dokk
115   continue
  !$acc end parallel
  if (any(a(1:3,1:3,1:3).ne.1)) call abort

  !$acc parallel
  !$acc loop collapse(3)
dol: do 120 l=1,3
doll: do ll=1,3
        do lll=1,3
          a(l,ll,lll) = 2
        enddo
      enddo doll
120 end do dol
  !$acc end parallel
  if (any(a(1:3,1:3,1:3).ne.2)) call abort
end program collapse3