1 ! Exercise nested function decomposition, gcc/tree-nested.c.
4 ! { dg-options "-std=legacy" }
11 integer :: i
, j
, k
, a(1:3, 4:6, 5:7)
15 !$acc parallel reduction (.or.:l)
16 !$acc loop worker vector collapse(4 - 1)
20 a(i
, j
, k
) = i
+ j
+ k
22 !$acc loop worker vector reduction(.or.:l) collapse(2)
26 if (a(i
, j
, k
) .ne
. (i
+ j
+ k
)) l
= .true
.
35 integer :: a(3,3,3), k
, kk
, kkk
, l
, ll
, lll
37 !$acc parallel num_workers(8)
38 ! Use "gang(static:1)" here and below to effectively turn gang-redundant
39 ! execution mode into something like gang-single.
40 !$acc loop gang(static:1) collapse(1)
42 !$acc loop collapse(2)
49 !$acc loop gang(static:1) collapse(1)
51 if (any(a(k
,1:3,1:3).ne
.1)) STOP 2
53 ! Use "gang(static:1)" here and below to effectively turn gang-redundant
54 ! execution mode into something like gang-single.
55 !$acc loop gang(static:1) collapse(1)
57 !$acc loop collapse(2)
64 !$acc loop gang(static:1) collapse(1)
66 if (any(a(l
,1:3,1:3).ne
.2)) STOP 3