Debian Codegraph @

gcc/testsuite/gfortran.dg/gomp/reduction-task-1.f90

raw
1 module m
2 implicit none
3 integer v
4 interface
5 subroutine foo(x)
6 integer, value :: x
7 end
8 end interface
9 contains
10
11 subroutine bar
12 integer i
13 !$omp do reduction (task, +: v)
14 do i = 0, 63
15 call foo (i)
16 end do
17 !$omp sections reduction (task, +: v)
18 call foo (-2)
19 !$omp section
20 call foo (-3)
21 !$omp end sections
22 !$omp parallel reduction (task, +: v)
23 call foo (-1)
24 !$omp end parallel
25 !$omp parallel do reduction (task, +: v)
26 do i = 0, 63
27 call foo (i)
28 end do
29 !$omp end parallel do
30 !$omp parallel sections reduction (task, +: v)
31 call foo (-2)
32 !$omp section
33 call foo (-3)
34 !$omp end parallel sections
35 !$omp teams distribute parallel do reduction (task, +: v) ! { dg-bogus "invalid 'task' reduction modifier on construct other than 'parallel', 'do', 'sections' or 'scope'" "PR101948" { xfail *-*-* } }
36 do i = 0, 63
37 call foo (i)
38 end do
39 !$omp end teams distribute parallel do
40 !$omp do reduction (default, +: v)
41 do i = 0, 63
42 call foo (i)
43 end do
44 !$omp sections reduction (default, +: v)
45 call foo (-2)
46 !$omp section
47 call foo (-3)
48 !$omp end sections
49 !$omp parallel reduction (default, +: v)
50 call foo (-1)
51 !$omp end parallel
52 !$omp parallel do reduction (default, +: v)
53 do i = 0, 63
54 call foo (i)
55 end do
56 !$omp end parallel do
57 !$omp parallel sections reduction (default, +: v)
58 call foo (-2)
59 !$omp section
60 call foo (-3)
61 !$omp end parallel sections
62 !$omp teams distribute parallel do reduction (default, +: v)
63 do i = 0, 63
64 call foo (i)
65 end do
66 !$omp end teams distribute parallel do
67 !$omp do reduction (default, +: v)
68 do i = 0, 63
69 call foo (i)
70 end do
71 !$omp end do nowait
72 !$omp sections reduction (default, +: v)
73 call foo (-2)
74 !$omp section
75 call foo (-3)
76 !$omp end sections nowait
77 !$omp simd reduction (default, +: v)
78 do i = 0, 63
79 v = v + 1
80 end do
81 !$omp do simd reduction (default, +: v)
82 do i = 0, 63
83 v = v + 1
84 end do
85 !$omp parallel do simd reduction (default, +: v)
86 do i = 0, 63
87 v = v + 1
88 end do
89 !$omp end parallel do simd
90 !$omp teams distribute parallel do simd reduction (default, +: v)
91 do i = 0, 63
92 v = v + 1
93 end do
94 !$omp end teams distribute parallel do simd
95 !$omp taskloop reduction (default, +: v)
96 do i = 0, 63
97 call foo (i)
98 end do
99 !$omp taskloop simd reduction (default, +: v)
100 do i = 0, 63
101 v = v + 1
102 end do
103 !$omp teams reduction (default, +: v)
104 call foo (i)
105 !$omp end teams
106 !$omp teams distribute reduction (default, +: v)
107 do i = 0, 63
108 call foo (i)
109 end do
110 !$omp end teams distribute
111 end
112 end