Debian Codegraph @

gcc/testsuite/gfortran.dg/goacc/pr93329.f90

raw
1 ! PR fortran/93329
2 ! { dg-do compile { target fopenmp } }
3 ! { dg-additional-options "-fopenmp" }
4
5 integer :: x, y, z
6 integer :: a(32)
7 !$acc kernels copyout(x)
8 !$omp target map(from:x) ! { dg-error "OMP TARGET directive cannot be specified within" }
9 x = 5
10 !$omp end target
11 !$acc end kernels
12 print *, x
13 !$acc kernels
14 !$omp atomic ! { dg-error "OMP ATOMIC directive cannot be specified within" }
15 x = x + 1
16 !$omp end atomic
17 !$acc end kernels
18 !$acc kernels
19 !$omp barrier ! { dg-error "OMP BARRIER directive cannot be specified within" }
20 !$acc end kernels
21 !$acc kernels
22 !$omp cancel parallel ! { dg-error "OMP CANCEL directive cannot be specified within" }
23 !$acc end kernels
24 !$acc kernels
25 !$omp cancellation point parallel ! { dg-error "OMP CANCELLATION POINT directive cannot be specified within" }
26 !$acc end kernels
27 !$acc kernels
28 !$omp flush ! { dg-error "OMP FLUSH directive cannot be specified within" }
29 !$acc end kernels
30 !$acc kernels
31 !$omp distribute ! { dg-error "OMP DISTRIBUTE directive cannot be specified within" }
32 do x = 0, 2
33 end do
34 !$acc end kernels
35 !$acc kernels
36 !$omp distribute parallel do ! { dg-error "OMP DISTRIBUTE PARALLEL DO directive cannot be specified within" }
37 do x = 0, 2
38 end do
39 !$acc end kernels
40 !$acc kernels
41 !$omp distribute parallel do simd ! { dg-error "OMP DISTRIBUTE PARALLEL DO SIMD directive cannot be specified within" }
42 do x = 0, 2
43 end do
44 !$acc end kernels
45 !$acc kernels
46 !$omp distribute simd ! { dg-error "OMP DISTRIBUTE SIMD directive cannot be specified within" }
47 do x = 0, 2
48 end do
49 !$acc end kernels
50 !$acc kernels
51 !$omp do simd ! { dg-error "OMP DO SIMD directive cannot be specified within" }
52 do x = 0, 2
53 end do
54 !$acc end kernels
55 !$acc kernels
56 !$omp simd ! { dg-error "OMP SIMD directive cannot be specified within" }
57 do x = 0, 2
58 end do
59 !$acc end kernels
60 !$acc kernels
61 !$omp target data map(from: x) ! { dg-error "OMP TARGET DATA directive cannot be specified within" }
62 !$omp end target data
63 !$acc end kernels
64 !$acc kernels
65 !$omp target enter data map(to: x) ! { dg-error "OMP TARGET ENTER DATA directive cannot be specified within" }
66 !$acc end kernels
67 !$acc kernels
68 !$omp target exit data map(from: x) ! { dg-error "OMP TARGET EXIT DATA directive cannot be specified within" }
69 !$acc end kernels
70 !$acc kernels
71 !$omp target parallel ! { dg-error "OMP TARGET PARALLEL directive cannot be specified within" }
72 !$omp end target parallel
73 !$acc end kernels
74 !$acc kernels
75 !$omp target parallel do ! { dg-error "OMP TARGET PARALLEL DO directive cannot be specified within" }
76 do x = 0, 2
77 end do
78 !$acc end kernels
79 !$acc kernels
80 !$omp target parallel do simd ! { dg-error "OMP TARGET PARALLEL DO SIMD directive cannot be specified within" }
81 do x = 0, 2
82 end do
83 !$acc end kernels
84 !$acc kernels
85 !$omp target simd ! { dg-error "OMP TARGET SIMD directive cannot be specified within" }
86 do x = 0, 2
87 end do
88 !$acc end kernels
89 !$acc kernels
90 !$omp target teams ! { dg-error "OMP TARGET TEAMS directive cannot be specified within" }
91 !$omp end target teams
92 !$acc end kernels
93 !$acc kernels
94 !$omp target teams distribute ! { dg-error "OMP TARGET TEAMS DISTRIBUTE directive cannot be specified within" }
95 do x = 0, 2
96 end do
97 !$acc end kernels
98 !$acc kernels
99 !$omp target teams distribute parallel do ! { dg-error "OMP TARGET TEAMS DISTRIBUTE PARALLEL DO directive cannot be specified within" }
100 do x = 0, 2
101 end do
102 !$acc end kernels
103 !$acc kernels
104 !$omp target teams distribute parallel do simd ! { dg-error "OMP TARGET TEAMS DISTRIBUTE PARALLEL DO SIMD directive cannot be specified within" }
105 do x = 0, 2
106 end do
107 !$acc end kernels
108 !$acc kernels
109 !$omp target teams distribute simd ! { dg-error "OMP TARGET TEAMS DISTRIBUTE SIMD directive cannot be specified within" }
110 do x = 0, 2
111 end do
112 !$acc end kernels
113 !$acc kernels
114 !$omp target update to(x) ! { dg-error "OMP TARGET UPDATE directive cannot be specified within" }
115 !$acc end kernels
116 !$acc kernels
117 !$omp taskgroup ! { dg-error "OMP TASKGROUP directive cannot be specified within" }
118 !$omp end taskgroup
119 !$acc end kernels
120 !$acc kernels
121 !$omp taskloop ! { dg-error "OMP TASKLOOP directive cannot be specified within" }
122 do x = 0, 2
123 end do
124 !$acc end kernels
125 !$acc kernels
126 !$omp taskloop simd ! { dg-error "OMP TASKLOOP SIMD directive cannot be specified within" }
127 do x = 0, 2
128 end do
129 !$acc end kernels
130 !$acc kernels
131 !$omp taskwait ! { dg-error "OMP TASKWAIT directive cannot be specified within" }
132 !$acc end kernels
133 !$acc kernels
134 !$omp taskyield ! { dg-error "OMP TASKYIELD directive cannot be specified within" }
135 !$acc end kernels
136 !$acc kernels
137 !$omp teams ! { dg-error "OMP TEAMS directive cannot be specified within" }
138 !$omp end teams
139 !$acc end kernels
140 !$acc kernels
141 !$omp teams distribute ! { dg-error "OMP TEAMS DISTRIBUTE directive cannot be specified within" }
142 do x = 0, 2
143 end do
144 !$acc end kernels
145 !$acc kernels
146 !$omp teams distribute parallel do ! { dg-error "OMP TEAMS DISTRIBUTE PARALLEL DO directive cannot be specified within" }
147 do x = 0, 2
148 end do
149 !$acc end kernels
150 !$acc kernels
151 !$omp teams distribute parallel do simd ! { dg-error "OMP TEAMS DISTRIBUTE PARALLEL DO SIMD directive cannot be specified within" }
152 do x = 0, 2
153 end do
154 !$acc end kernels
155 !$acc kernels
156 !$omp teams distribute simd ! { dg-error "OMP TEAMS DISTRIBUTE SIMD directive cannot be specified within" }
157 do x = 0, 2
158 end do
159 !$acc end kernels
160 !$acc kernels
161 !$omp parallel do ! { dg-error "OMP PARALLEL DO directive cannot be specified within" }
162 do x = 0, 2
163 end do
164 !$acc end kernels
165 !$acc kernels
166 !$omp parallel do simd ! { dg-error "OMP PARALLEL DO SIMD directive cannot be specified within" }
167 do x = 0, 2
168 end do
169 !$acc end kernels
170 !$acc kernels
171 !$omp parallel ! { dg-error "OMP PARALLEL directive cannot be specified within" }
172 !$omp end parallel
173 !$acc end kernels
174 !$acc kernels
175 !$omp parallel sections ! { dg-error "OMP PARALLEL SECTIONS directive cannot be specified within" }
176 y = 1
177 !$omp section
178 z = 2
179 !$omp end parallel sections
180 !$acc end kernels
181 !$acc kernels
182 !$omp sections ! { dg-error "OMP SECTIONS directive cannot be specified within" }
183 y = 1
184 !$omp section
185 z = 2
186 !$omp end sections
187 !$acc end kernels
188 !$acc kernels
189 !$omp ordered ! { dg-error "OMP ORDERED directive cannot be specified within" }
190 !$omp end ordered
191 !$acc end kernels
192 !$acc kernels
193 !$omp critical ! { dg-error "OMP CRITICAL directive cannot be specified within" }
194 !$omp end critical
195 !$acc end kernels
196 !$acc kernels
197 !$omp master ! { dg-error "OMP MASTER directive cannot be specified within" }
198 !$omp end master
199 !$acc end kernels
200 !$acc kernels
201 !$omp single ! { dg-error "OMP SINGLE directive cannot be specified within" }
202 !$omp end single
203 !$acc end kernels
204 !$acc kernels
205 !$omp task ! { dg-error "OMP TASK directive cannot be specified within" }
206 !$omp end task
207 !$acc end kernels
208 !$acc kernels
209 !$omp workshare ! { dg-error "OMP WORKSHARE directive cannot be specified within" }
210 a(:) = 1
211 !$omp end workshare
212 !$acc end kernels
213 !$acc kernels
214 !$omp parallel workshare ! { dg-error "OMP PARALLEL WORKSHARE directive cannot be specified within" }
215 a(:) = 1
216 !$omp end parallel workshare
217 !$acc end kernels
218 !$acc kernels
219 !$omp do ! { dg-error "OMP DO directive cannot be specified within" }
220 do x = 0, 2
221 end do
222 !$acc end kernels
223 end