Lower zeroing array assignment to memset for allocatable arrays.
[official-gcc.git] / gcc / testsuite / c-c++-common / gomp / clauses-6.c
blob3502647ffb408d0833cb55a9cce30e4b19b3d41a
1 /* { dg-do compile } */
2 /* { dg-additional-options "-std=c99" { target c } } */
4 typedef enum omp_allocator_handle_t
5 #if __cplusplus >= 201103L
6 : __UINTPTR_TYPE__
7 #endif
9 omp_null_allocator = 0,
10 omp_default_mem_alloc = 1,
11 omp_large_cap_mem_alloc = 2,
12 omp_const_mem_alloc = 3,
13 omp_high_bw_mem_alloc = 4,
14 omp_low_lat_mem_alloc = 5,
15 omp_cgroup_mem_alloc = 6,
16 omp_pteam_mem_alloc = 7,
17 omp_thread_mem_alloc = 8,
18 __omp_allocator_handle_t_max__ = __UINTPTR_MAX__
19 } omp_allocator_handle_t;
21 typedef enum omp_sync_hint_t {
22 omp_sync_hint_none = 0x0,
23 omp_lock_hint_none = omp_sync_hint_none,
24 omp_sync_hint_uncontended = 0x1,
25 omp_lock_hint_uncontended = omp_sync_hint_uncontended,
26 omp_sync_hint_contended = 0x2,
27 omp_lock_hint_contended = omp_sync_hint_contended,
28 omp_sync_hint_nonspeculative = 0x4,
29 omp_lock_hint_nonspeculative = omp_sync_hint_nonspeculative,
30 omp_sync_hint_speculative = 0x8,
31 omp_lock_hint_speculative = omp_sync_hint_speculative
32 } omp_sync_hint_t;
34 typedef struct __attribute__((__aligned__ (sizeof (void *)))) omp_depend_t {
35 char __omp_depend_t__[2 * sizeof (void *)];
36 } omp_depend_t;
38 int t;
39 #pragma omp threadprivate (t)
41 #pragma omp declare target
42 int f, l, ll, r, r2;
44 void
45 foo (int d, int m, int i1, int i2, int p, int *idp, int s,
46 int nte, int tl, int nth, int g, int nta, int fi, int pp, int *q, int ntm)
48 #pragma omp distribute parallel for, \
49 private (p), firstprivate (f), collapse(1), dist_schedule(static, 16), \
50 if (parallel: i2), default(shared), shared(s), reduction(+:r), num_threads (nth), proc_bind(spread), \
51 lastprivate (l), schedule(static, 4), order(concurrent), allocate (omp_default_mem_alloc:f)
52 for (int i = 0; i < 64; i++)
53 ll++;
54 #pragma omp distribute parallel for simd, \
55 private (p), firstprivate (f), collapse(1), dist_schedule(static, 16), \
56 if (parallel: i2), if(simd: i1), default(shared), shared(s), reduction(+:r), num_threads (nth), proc_bind(spread), \
57 lastprivate (l), schedule(static, 4), nontemporal(ntm), \
58 safelen(8), simdlen(4), aligned(q: 32), order(concurrent), allocate (omp_default_mem_alloc:f)
59 for (int i = 0; i < 64; i++)
60 ll++;
61 #pragma omp distribute simd, \
62 private (p), firstprivate (f), collapse(1), dist_schedule(static, 16), \
63 safelen(8), simdlen(4), aligned(q: 32), reduction(+:r), if(i1), nontemporal(ntm), \
64 order(concurrent), allocate (omp_default_mem_alloc:f)
65 for (int i = 0; i < 64; i++)
66 ll++;
69 void
70 qux (int p)
72 #pragma omp loop, bind(teams), order(concurrent), \
73 private (p), lastprivate (l), collapse(1), reduction(+:r)
74 for (l = 0; l < 64; ++l)
75 ll++;
77 #pragma omp end declare target
79 void
80 baz (int d, int m, int i1, int i2, int p, int *idp, int s,
81 int nte, int tl, int nth, int g, int nta, int fi, int pp, int *q, int ntm)
83 #pragma omp distribute parallel for, \
84 private (p), firstprivate (f), collapse(1), dist_schedule(static, 16), \
85 if (parallel: i2), default(shared), shared(s), reduction(+:r), num_threads (nth), proc_bind(spread), \
86 lastprivate (l), schedule(static, 4), copyin(t), allocate (p)
87 for (int i = 0; i < 64; i++)
88 ll++;
89 #pragma omp distribute parallel for, \
90 private (p), firstprivate (f), collapse(1), dist_schedule(static, 16), \
91 if (parallel: i2), default(shared), shared(s), reduction(+:r), num_threads (nth), proc_bind(spread), \
92 lastprivate (l), schedule(static, 4), order(concurrent), allocate (p)
93 for (int i = 0; i < 64; i++)
94 ll++;
95 #pragma omp distribute parallel for simd, \
96 private (p), firstprivate (f), collapse(1), dist_schedule(static, 16), \
97 if (parallel: i2), if(simd: i1), default(shared), shared(s), reduction(+:r), num_threads (nth), proc_bind(spread), \
98 lastprivate (l), schedule(static, 4), nontemporal(ntm), \
99 safelen(8), simdlen(4), aligned(q: 32), copyin(t), allocate (f)
100 for (int i = 0; i < 64; i++)
101 ll++;
102 #pragma omp distribute parallel for simd, \
103 private (p), firstprivate (f), collapse(1), dist_schedule(static, 16), \
104 if (parallel: i2), if(simd: i1), default(shared), shared(s), reduction(+:r), num_threads (nth), proc_bind(spread), \
105 lastprivate (l), schedule(static, 4), nontemporal(ntm), \
106 safelen(8), simdlen(4), aligned(q: 32), order(concurrent), allocate (f)
107 for (int i = 0; i < 64; i++)
108 ll++;
109 #pragma omp distribute simd, \
110 private (p), firstprivate (f), collapse(1), dist_schedule(static, 16), \
111 safelen(8), simdlen(4), aligned(q: 32), reduction(+:r), if(i1), nontemporal(ntm), \
112 order(concurrent), allocate (f)
113 for (int i = 0; i < 64; i++)
114 ll++;
115 #pragma omp loop, bind(parallel), order(concurrent), \
116 private (p), lastprivate (l), collapse(1), reduction(+:r)
117 for (l = 0; l < 64; ++l)
118 ll++;
121 void
122 bar (int d, int m, int i1, int i2, int i3, int p, int *idp, int hda, int s,
123 int nte, int tl, int nth, int g, int nta, int fi, int pp, int *q, int *dd, int ntm,
124 int n1, int n2)
126 #pragma omp for simd, \
127 private (p), firstprivate (f), lastprivate (l), linear (ll:1), reduction(+:r), schedule(static, 4), collapse(1), nowait, \
128 safelen(8), simdlen(4), aligned(q: 32), nontemporal(ntm), if(i1), order(concurrent), allocate (f)
129 for (int i = 0; i < 64; i++)
130 ll++;
131 #pragma omp parallel for, \
132 private (p), firstprivate (f), if (parallel: i2), default(shared), shared(s), copyin(t), reduction(+:r), num_threads (nth), proc_bind(spread), \
133 lastprivate (l), linear (ll:1), ordered, schedule(static, 4), collapse(1), allocate (f)
134 for (int i = 0; i < 64; i++)
135 ll++;
136 #pragma omp parallel for, \
137 private (p), firstprivate (f), if (parallel: i2), default(shared), shared(s), copyin(t), reduction(+:r), num_threads (nth), proc_bind(spread), \
138 lastprivate (l), linear (ll:1), schedule(static, 4), collapse(1), order(concurrent), allocate (f)
139 for (int i = 0; i < 64; i++)
140 ll++;
141 #pragma omp parallel for simd, \
142 private (p), firstprivate (f), if (i2), default(shared), shared(s), copyin(t), reduction(+:r), num_threads (nth), proc_bind(spread), \
143 lastprivate (l), linear (ll:1), schedule(static, 4), collapse(1), \
144 safelen(8), simdlen(4), aligned(q: 32), nontemporal(ntm), order(concurrent), allocate (f)
145 for (int i = 0; i < 64; i++)
146 ll++;
147 #pragma omp parallel sections, \
148 private (p), firstprivate (f), if (parallel: i2), default(shared), shared(s), copyin(t), reduction(+:r), num_threads (nth), proc_bind(spread), \
149 lastprivate (l), allocate (f)
151 #pragma omp section
153 #pragma omp section
156 #pragma omp target parallel, \
157 device(d), map (tofrom: m), if (target: i1), private (p), firstprivate (f), defaultmap(tofrom: scalar), is_device_ptr (idp), \
158 if (parallel: i2), default(shared), shared(s), reduction(+:r), num_threads (nth), proc_bind(spread), \
159 nowait, depend(inout: dd[0]), allocate (omp_default_mem_alloc:f), in_reduction(+:r2), has_device_addr(hda)
161 #pragma omp target parallel for, \
162 device(d), map (tofrom: m), if (target: i1), private (p), firstprivate (f), defaultmap(tofrom: scalar), is_device_ptr (idp), \
163 if (parallel: i2), default(shared), shared(s), reduction(+:r), num_threads (nth), proc_bind(spread), \
164 lastprivate (l), linear (ll:1), ordered, schedule(static, 4), collapse(1), nowait, depend(inout: dd[0]), \
165 allocate (omp_default_mem_alloc:f), in_reduction(+:r2), has_device_addr(hda)
166 for (int i = 0; i < 64; i++)
167 ll++;
168 #pragma omp target parallel for, \
169 device(d), map (tofrom: m), if (target: i1), private (p), firstprivate (f), defaultmap(tofrom: scalar), is_device_ptr (idp), \
170 if (parallel: i2), default(shared), shared(s), reduction(+:r), num_threads (nth), proc_bind(spread), \
171 lastprivate (l), linear (ll:1), schedule(static, 4), collapse(1), nowait, depend(inout: dd[0]), order(concurrent), \
172 allocate (omp_default_mem_alloc:f), in_reduction(+:r2), has_device_addr(hda)
173 for (int i = 0; i < 64; i++)
174 ll++;
175 #pragma omp target parallel for simd, \
176 device(d), map (tofrom: m), if (target: i1), private (p), firstprivate (f), defaultmap(tofrom: scalar), is_device_ptr (idp), \
177 if (parallel: i2), default(shared), shared(s), reduction(+:r), num_threads (nth), proc_bind(spread), \
178 lastprivate (l), linear (ll:1), schedule(static, 4), collapse(1), \
179 safelen(8), simdlen(4), aligned(q: 32), nowait, depend(inout: dd[0]), nontemporal(ntm), if (simd: i3), order(concurrent), \
180 allocate (omp_default_mem_alloc:f), in_reduction(+:r2), has_device_addr(hda)
181 for (int i = 0; i < 64; i++)
182 ll++;
183 #pragma omp target teams, \
184 device(d), map (tofrom: m), if (target: i1), private (p), firstprivate (f), defaultmap(tofrom: scalar), is_device_ptr (idp), \
185 shared(s), default(shared), reduction(+:r), num_teams(nte - 1:nte), thread_limit(tl), nowait depend(inout: dd[0]), \
186 allocate (omp_default_mem_alloc:f), in_reduction(+:r2), has_device_addr(hda)
188 #pragma omp target teams distribute, \
189 device(d), map (tofrom: m), if (target: i1), private (p), firstprivate (f), defaultmap(tofrom: scalar), is_device_ptr (idp), \
190 shared(s), default(shared), reduction(+:r), num_teams(nte), thread_limit(tl), order(concurrent), \
191 collapse(1), dist_schedule(static, 16), nowait, depend(inout: dd[0]), allocate (omp_default_mem_alloc:f), in_reduction(+:r2), \
192 has_device_addr(hda)
193 for (int i = 0; i < 64; i++)
195 #pragma omp target teams distribute parallel for, \
196 device(d), map (tofrom: m), if (target: i1), private (p), firstprivate (f), defaultmap(tofrom: scalar), is_device_ptr (idp), \
197 shared(s), default(shared), reduction(+:r), num_teams(nte-1:nte), thread_limit(tl), \
198 collapse(1), dist_schedule(static, 16), \
199 if (parallel: i2), num_threads (nth), proc_bind(spread), \
200 lastprivate (l), schedule(static, 4), nowait, depend(inout: dd[0]), order(concurrent), \
201 allocate (omp_default_mem_alloc:f), in_reduction(+:r2), has_device_addr(hda)
202 for (int i = 0; i < 64; i++)
203 ll++;
204 #pragma omp target teams distribute parallel for simd, \
205 device(d), map (tofrom: m), if (target: i1), private (p), firstprivate (f), defaultmap(tofrom: scalar), is_device_ptr (idp), \
206 shared(s), default(shared), reduction(+:r), num_teams(nte), thread_limit(tl), \
207 collapse(1), dist_schedule(static, 16), \
208 if (parallel: i2), num_threads (nth), proc_bind(spread), \
209 lastprivate (l), schedule(static, 4), order(concurrent), \
210 safelen(8), simdlen(4), aligned(q: 32), nowait, depend(inout: dd[0]), nontemporal(ntm), if (simd: i3), \
211 allocate (omp_default_mem_alloc:f), in_reduction(+:r2), has_device_addr(hda)
212 for (int i = 0; i < 64; i++)
213 ll++;
214 #pragma omp target teams distribute simd, \
215 device(d), map (tofrom: m), if (i1), private (p), firstprivate (f), defaultmap(tofrom: scalar), is_device_ptr (idp), \
216 shared(s), default(shared), reduction(+:r), num_teams(nte-1:nte), thread_limit(tl), \
217 collapse(1), dist_schedule(static, 16), order(concurrent), \
218 safelen(8), simdlen(4), aligned(q: 32), nowait depend(inout: dd[0]), nontemporal(ntm), \
219 allocate (omp_default_mem_alloc:f), in_reduction(+:r2), has_device_addr(hda)
220 for (int i = 0; i < 64; i++)
221 ll++;
222 #pragma omp target simd, \
223 device(d), map (tofrom: m), if (target: i1), private (p), firstprivate (f), defaultmap(tofrom: scalar), is_device_ptr (idp), \
224 safelen(8), simdlen(4), lastprivate (l), linear(ll: 1), aligned(q: 32), reduction(+:r), \
225 nowait depend(inout: dd[0]), nontemporal(ntm), if(simd:i3), order(concurrent), \
226 allocate (omp_default_mem_alloc:f), in_reduction(+:r2), has_device_addr(hda)
227 for (int i = 0; i < 64; i++)
228 ll++;
229 #pragma omp taskgroup, task_reduction(+:r2), allocate (r2)
230 #pragma omp taskloop simd, \
231 private (p), firstprivate (f), lastprivate (l), shared (s), default(shared), grainsize (g), collapse(1), untied, if(taskloop: i1), if(simd: i2), final(fi), mergeable, priority (pp), \
232 safelen(8), simdlen(4), linear(ll: 1), aligned(q: 32), reduction(default, +:r), in_reduction(+:r2), nontemporal(ntm), \
233 order(concurrent), allocate (f)
234 for (int i = 0; i < 64; i++)
235 ll++;
236 #pragma omp taskgroup, task_reduction(+:r), allocate (r)
237 #pragma omp taskloop simd, \
238 private (p), firstprivate (f), lastprivate (l), shared (s), default(shared), grainsize (g), collapse(1), untied, if(i1), final(fi), mergeable, nogroup, priority (pp), \
239 safelen(8), simdlen(4), linear(ll: 1), aligned(q: 32), in_reduction(+:r), nontemporal(ntm), \
240 order(concurrent), allocate (f)
241 for (int i = 0; i < 64; i++)
242 ll++;
243 #pragma omp taskwait
244 #pragma omp taskloop simd, \
245 private (p), firstprivate (f), lastprivate (l), shared (s), default(shared), num_tasks (nta), collapse(1), if(taskloop: i1), final(fi), priority (pp), \
246 safelen(8), simdlen(4), linear(ll: 1), aligned(q: 32), reduction(+:r), if (simd: i3), nontemporal(ntm), \
247 order(concurrent), allocate (f)
248 for (int i = 0; i < 64; i++)
249 ll++;
250 #pragma omp target, nowait, depend(inout: dd[0]), in_reduction(+:r2)
251 #pragma omp teams distribute, \
252 private(p), firstprivate (f), shared(s), default(shared), reduction(+:r), num_teams(nte), thread_limit(tl), \
253 collapse(1), dist_schedule(static, 16), allocate (omp_default_mem_alloc: f), order(concurrent)
254 for (int i = 0; i < 64; i++)
256 #pragma omp target
257 #pragma omp teams distribute parallel for, \
258 private(p), firstprivate (f), shared(s), default(shared), reduction(+:r), num_teams(nte-1:nte), thread_limit(tl), \
259 collapse(1), dist_schedule(static, 16), \
260 if (parallel: i2), num_threads (nth), proc_bind(spread), \
261 lastprivate (l), schedule(static, 4), order(concurrent), allocate (omp_default_mem_alloc: f)
262 for (int i = 0; i < 64; i++)
263 ll++;
264 #pragma omp target
265 #pragma omp teams distribute parallel for simd, \
266 private(p), firstprivate (f), shared(s), default(shared), reduction(+:r), num_teams(nte), thread_limit(tl), \
267 collapse(1), dist_schedule(static, 16), \
268 if (parallel: i2), num_threads (nth), proc_bind(spread), \
269 lastprivate (l), schedule(static, 4), order(concurrent), \
270 safelen(8), simdlen(4), aligned(q: 32), if (simd: i3), nontemporal(ntm), \
271 allocate (omp_default_mem_alloc: f)
272 for (int i = 0; i < 64; i++)
273 ll++;
274 #pragma omp target
275 #pragma omp teams distribute simd, \
276 private(p), firstprivate (f), shared(s), default(shared), reduction(+:r), num_teams(nte-1:nte), thread_limit(tl), \
277 collapse(1), dist_schedule(static, 16), order(concurrent), \
278 safelen(8), simdlen(4), aligned(q: 32), if(i3), nontemporal(ntm), \
279 allocate (omp_default_mem_alloc: f)
280 for (int i = 0; i < 64; i++)
281 ll++;
282 #pragma omp teams distribute parallel for, \
283 private(p), firstprivate (f), shared(s), default(shared), reduction(+:r), num_teams(nte), thread_limit(tl), \
284 collapse(1), dist_schedule(static, 16), \
285 if (parallel: i2), num_threads (nth), proc_bind(spread), \
286 lastprivate (l), schedule(static, 4), copyin(t), allocate (f)
287 for (int i = 0; i < 64; i++)
288 ll++;
289 #pragma omp teams distribute parallel for, \
290 private(p), firstprivate (f), shared(s), default(shared), reduction(+:r), num_teams(nte-1:nte), thread_limit(tl), \
291 collapse(1), dist_schedule(static, 16), order(concurrent), \
292 if (parallel: i2), num_threads (nth), proc_bind(spread), \
293 lastprivate (l), schedule(static, 4), allocate (f)
294 for (int i = 0; i < 64; i++)
295 ll++;
296 #pragma omp teams distribute parallel for simd, \
297 private(p), firstprivate (f), shared(s), default(shared), reduction(+:r), num_teams(nte), thread_limit(tl), \
298 collapse(1), dist_schedule(static, 16), \
299 if (parallel: i2), num_threads (nth), proc_bind(spread), \
300 lastprivate (l), schedule(static, 4), \
301 safelen(8), simdlen(4), aligned(q: 32), if (simd: i3), nontemporal(ntm), copyin(t), \
302 allocate (f)
303 for (int i = 0; i < 64; i++)
304 ll++;
305 #pragma omp teams distribute parallel for simd, \
306 private(p), firstprivate (f), shared(s), default(shared), reduction(+:r), num_teams(nte-1:nte), thread_limit(tl), \
307 collapse(1), dist_schedule(static, 16), \
308 if (parallel: i2), num_threads (nth), proc_bind(spread), \
309 lastprivate (l), schedule(static, 4), order(concurrent), \
310 safelen(8), simdlen(4), aligned(q: 32), if (simd: i3), nontemporal(ntm), \
311 allocate (f)
312 for (int i = 0; i < 64; i++)
313 ll++;
314 #pragma omp teams distribute simd, \
315 private(p), firstprivate (f), shared(s), default(shared), reduction(+:r), num_teams(nte), thread_limit(tl), \
316 collapse(1), dist_schedule(static, 16), order(concurrent), \
317 safelen(8), simdlen(4), aligned(q: 32), if(i3), nontemporal(ntm), allocate(f)
318 for (int i = 0; i < 64; i++)
319 ll++;
320 #pragma omp parallel master, \
321 private (p), firstprivate (f), if (parallel: i2), default(shared), shared(s), reduction(+:r), \
322 num_threads (nth), proc_bind(spread), copyin(t), allocate (f)
324 #pragma omp parallel masked, \
325 private (p), firstprivate (f), if (parallel: i2), default(shared), shared(s), reduction(+:r), \
326 num_threads (nth), proc_bind(spread), copyin(t), allocate (f), filter (d)
328 #pragma omp taskgroup, task_reduction (+:r2), allocate (r2)
329 #pragma omp master taskloop, \
330 private (p), firstprivate (f), lastprivate (l), shared (s), default(shared), grainsize (g), collapse(1), untied, if(taskloop: i1), final(fi), mergeable, priority (pp), \
331 reduction(default, +:r), in_reduction(+:r2), allocate (f)
332 for (int i = 0; i < 64; i++)
333 ll++;
334 #pragma omp taskgroup, task_reduction (+:r2), allocate (r2)
335 #pragma omp masked taskloop, \
336 private (p), firstprivate (f), lastprivate (l), shared (s), default(shared), grainsize (g), collapse(1), untied, if(taskloop: i1), final(fi), mergeable, priority (pp), \
337 reduction(default, +:r), in_reduction(+:r2), allocate (f), filter (d)
338 for (int i = 0; i < 64; i++)
339 ll++;
340 #pragma omp taskgroup, task_reduction (+:r2), allocate (r2)
341 #pragma omp master taskloop simd, \
342 private (p), firstprivate (f), lastprivate (l), shared (s), default(shared), grainsize (g), collapse(1), untied, if(taskloop: i1), if(simd: i2), final(fi), mergeable, priority (pp), \
343 safelen(8), simdlen(4), linear(ll: 1), aligned(q: 32), reduction(default, +:r), in_reduction(+:r2), nontemporal(ntm), \
344 order(concurrent), allocate (f)
345 for (int i = 0; i < 64; i++)
346 ll++;
347 #pragma omp taskgroup, task_reduction (+:r2), allocate (r2)
348 #pragma omp masked taskloop simd, \
349 private (p), firstprivate (f), lastprivate (l), shared (s), default(shared), grainsize (g), collapse(1), untied, if(taskloop: i1), if(simd: i2), final(fi), mergeable, priority (pp), \
350 safelen(8), simdlen(4), linear(ll: 1), aligned(q: 32), reduction(default, +:r), in_reduction(+:r2), nontemporal(ntm), \
351 order(concurrent), allocate (f), filter (d)
352 for (int i = 0; i < 64; i++)
353 ll++;
354 #pragma omp parallel master taskloop, \
355 private (p), firstprivate (f), lastprivate (l), shared (s), default(shared), grainsize (g), collapse(1), untied, if(taskloop: i1), final(fi), mergeable, priority (pp), \
356 reduction(default, +:r), if (parallel: i2), num_threads (nth), proc_bind(spread), copyin(t), allocate (f)
357 for (int i = 0; i < 64; i++)
358 ll++;
359 #pragma omp parallel masked taskloop, \
360 private (p), firstprivate (f), lastprivate (l), shared (s), default(shared), grainsize (g), collapse(1), untied, if(taskloop: i1), final(fi), mergeable, priority (pp), \
361 reduction(default, +:r), if (parallel: i2), num_threads (nth), proc_bind(spread), copyin(t), allocate (f), filter (d)
362 for (int i = 0; i < 64; i++)
363 ll++;
364 #pragma omp parallel master taskloop simd, \
365 private (p), firstprivate (f), lastprivate (l), shared (s), default(shared), grainsize (g), collapse(1), untied, if(taskloop: i1), if(simd: i2), final(fi), mergeable, priority (pp), \
366 safelen(8), simdlen(4), linear(ll: 1), aligned(q: 32), reduction(default, +:r), nontemporal(ntm), if (parallel: i2), num_threads (nth), proc_bind(spread), copyin(t), \
367 order(concurrent), allocate (f)
368 for (int i = 0; i < 64; i++)
369 ll++;
370 #pragma omp parallel masked taskloop simd, \
371 private (p), firstprivate (f), lastprivate (l), shared (s), default(shared), grainsize (g), collapse(1), untied, if(taskloop: i1), if(simd: i2), final(fi), mergeable, priority (pp), \
372 safelen(8), simdlen(4), linear(ll: 1), aligned(q: 32), reduction(default, +:r), nontemporal(ntm), if (parallel: i2), num_threads (nth), proc_bind(spread), copyin(t), \
373 order(concurrent), allocate (f), filter (d)
374 for (int i = 0; i < 64; i++)
375 ll++;
376 #pragma omp taskgroup, task_reduction (+:r2), allocate (r2)
377 #pragma omp master taskloop, \
378 private (p), firstprivate (f), lastprivate (l), shared (s), default(shared), num_tasks (nta), collapse(1), untied, if(i1), final(fi), mergeable, priority (pp), \
379 reduction(default, +:r), in_reduction(+:r2)
380 for (int i = 0; i < 64; i++)
381 ll++;
382 #pragma omp taskgroup, task_reduction (+:r2), allocate (r2)
383 #pragma omp mastked taskloop, \
384 private (p), firstprivate (f), lastprivate (l), shared (s), default(shared), num_tasks (nta), collapse(1), untied, if(i1), final(fi), mergeable, priority (pp), \
385 reduction(default, +:r), in_reduction(+:r2), filter (d)
386 for (int i = 0; i < 64; i++)
387 ll++;
388 #pragma omp taskgroup, task_reduction (+:r2), allocate (r2)
389 #pragma omp master taskloop simd, \
390 private (p), firstprivate (f), lastprivate (l), shared (s), default(shared), num_tasks (nta), collapse(1), untied, if(i1), final(fi), mergeable, priority (pp), \
391 safelen(8), simdlen(4), linear(ll: 1), aligned(q: 32), reduction(default, +:r), in_reduction(+:r2), nontemporal(ntm), \
392 order(concurrent), allocate (f)
393 for (int i = 0; i < 64; i++)
394 ll++;
395 #pragma omp taskgroup, task_reduction (+:r2), allocate (r2)
396 #pragma omp masked taskloop simd, \
397 private (p), firstprivate (f), lastprivate (l), shared (s), default(shared), num_tasks (nta), collapse(1), untied, if(i1), final(fi), mergeable, priority (pp), \
398 safelen(8), simdlen(4), linear(ll: 1), aligned(q: 32), reduction(default, +:r), in_reduction(+:r2), nontemporal(ntm), \
399 order(concurrent), allocate (f), filter (d)
400 for (int i = 0; i < 64; i++)
401 ll++;
402 #pragma omp parallel master taskloop, \
403 private (p), firstprivate (f), lastprivate (l), shared (s), default(shared), num_tasks (nta), collapse(1), untied, if(i1), final(fi), mergeable, priority (pp), \
404 reduction(default, +:r), num_threads (nth), proc_bind(spread), copyin(t), allocate (f)
405 for (int i = 0; i < 64; i++)
406 ll++;
407 #pragma omp parallel masked taskloop, \
408 private (p), firstprivate (f), lastprivate (l), shared (s), default(shared), num_tasks (nta), collapse(1), untied, if(i1), final(fi), mergeable, priority (pp), \
409 reduction(default, +:r), num_threads (nth), proc_bind(spread), copyin(t), allocate (f), filter (d)
410 for (int i = 0; i < 64; i++)
411 ll++;
412 #pragma omp parallel master taskloop simd, \
413 private (p), firstprivate (f), lastprivate (l), shared (s), default(shared), num_tasks (nta), collapse(1), untied, if(i1), final(fi), mergeable, priority (pp), \
414 safelen(8), simdlen(4), linear(ll: 1), aligned(q: 32), reduction(default, +:r), nontemporal(ntm), num_threads (nth), proc_bind(spread), copyin(t), \
415 order(concurrent), allocate (f)
416 for (int i = 0; i < 64; i++)
417 ll++;
418 #pragma omp parallel masked taskloop simd, \
419 private (p), firstprivate (f), lastprivate (l), shared (s), default(shared), num_tasks (nta), collapse(1), untied, if(i1), final(fi), mergeable, priority (pp), \
420 safelen(8), simdlen(4), linear(ll: 1), aligned(q: 32), reduction(default, +:r), nontemporal(ntm), num_threads (nth), proc_bind(spread), copyin(t), \
421 order(concurrent), allocate (f), filter (d)
422 for (int i = 0; i < 64; i++)
423 ll++;
424 #pragma omp loop, bind(thread), order(concurrent), \
425 private (p), lastprivate (l), collapse(1), reduction(+:r)
426 for (l = 0; l < 64; ++l)
427 ll++;
428 #pragma omp parallel loop, \
429 private (p), firstprivate (f), if (parallel: i2), default(shared), shared(s), copyin(t), reduction(+:r), num_threads (nth), proc_bind(spread), \
430 lastprivate (l), collapse(1), bind(parallel), order(concurrent), allocate (f)
431 for (l = 0; l < 64; l++)
432 ll++;
433 #pragma omp parallel loop, \
434 private (p), firstprivate (f), if (parallel: i2), default(shared), shared(s), copyin(t), reduction(+:r), num_threads (nth), proc_bind(spread), \
435 lastprivate (l), collapse(1), allocate (f)
436 for (l = 0; l < 64; l++)
437 ll++;
438 #pragma omp teams loop, \
439 private(p), firstprivate (f), shared(s), default(shared), reduction(+:r), num_teams(nte-1:nte), thread_limit(tl), \
440 collapse(1), lastprivate (l), bind(teams), allocate (f)
441 for (l = 0; l < 64; ++l)
443 #pragma omp teams loop, \
444 private(p), firstprivate (f), shared(s), default(shared), reduction(+:r), num_teams(nte), thread_limit(tl), \
445 collapse(1), lastprivate (l), order(concurrent), allocate (f)
446 for (l = 0; l < 64; ++l)
448 #pragma omp target parallel loop, \
449 device(d), map (tofrom: m), if (target: i1), private (p), firstprivate (f), defaultmap(tofrom: scalar), is_device_ptr (idp), \
450 if (parallel: i2), default(shared), shared(s), reduction(+:r), num_threads (nth), proc_bind(spread), \
451 nowait depend(inout: dd[0]), lastprivate (l), bind(parallel), order(concurrent), collapse(1), \
452 allocate (omp_default_mem_alloc: f), in_reduction(+:r2), has_device_addr(hda)
453 for (l = 0; l < 64; ++l)
455 #pragma omp target parallel loop, \
456 device(d), map (tofrom: m), if (target: i1), private (p), firstprivate (f), defaultmap(tofrom: scalar), is_device_ptr (idp), \
457 if (parallel: i2), default(shared), shared(s), reduction(+:r), num_threads (nth), proc_bind(spread), \
458 nowait depend(inout: dd[0]), lastprivate (l), order(concurrent), collapse(1), \
459 allocate (omp_default_mem_alloc: f), in_reduction(+:r2), has_device_addr(hda)
460 for (l = 0; l < 64; ++l)
462 #pragma omp target teams loop, \
463 device(d), map (tofrom: m), if (target: i1), private (p), firstprivate (f), defaultmap(tofrom: scalar), is_device_ptr (idp), \
464 shared(s), default(shared), reduction(+:r), num_teams(nte-1:nte), thread_limit(tl), nowait depend(inout: dd[0]), \
465 lastprivate (l), bind(teams), collapse(1), \
466 allocate (omp_default_mem_alloc: f), in_reduction(+:r2), has_device_addr(hda)
467 for (l = 0; l < 64; ++l)
469 #pragma omp target teams loop, \
470 device(d), map (tofrom: m), if (target: i1), private (p), firstprivate (f), defaultmap(tofrom: scalar), is_device_ptr (idp), \
471 shared(s), default(shared), reduction(+:r), num_teams(nte), thread_limit(tl), nowait depend(inout: dd[0]), \
472 lastprivate (l), order(concurrent), collapse(1), \
473 allocate (omp_default_mem_alloc: f), in_reduction(+:r2), has_device_addr(hda)
474 for (l = 0; l < 64; ++l)
476 #pragma omp critical
478 #pragma omp critical (foobar),hint(omp_sync_hint_none)
480 #pragma omp taskwait, depend (inout: dd[0])
482 #pragma omp taskgroup, task_reduction(+:r2),allocate (r2)
484 #pragma omp atomic, update,seq_cst,hint(omp_sync_hint_none)
485 p++;
486 #pragma omp atomic, read, hint(omp_sync_hint_none),relaxed
487 f = p;
488 #pragma omp atomic,write, release hint(omp_sync_hint_none)
489 p = f;
490 #pragma omp flush
492 #pragma omp flush, acq_rel
494 #pragma omp flush, acquire
496 #pragma omp flush, release
498 #pragma omp flush, seq_cst
500 #pragma omp flush (p, f)
502 #pragma omp simd, \
503 private (p),lastprivate (l),linear (ll:1),reduction(+:r),collapse(1),safelen(8),simdlen(4),aligned(q: 32), \
504 nontemporal(ntm),if(i1)
505 for (int i = 0; i < 64; i++)
506 #pragma omp ordered, simd
507 ll++;
508 #pragma omp for, \
509 private (p),firstprivate (f),lastprivate (l),linear (ll:1),reduction(+:r),schedule(static, 4),collapse(1),nowait, \
510 ordered, allocate (f)
511 for (int i = 0; i < 64; i++)
512 #pragma omp ordered, threads
513 ll++;
514 #pragma omp for, ordered (1)
515 for (l = 0; l < 64; l++)
517 #pragma omp ordered, depend (sink: l - 1)
519 #pragma omp ordered, depend (source)
522 extern omp_depend_t depobj;
523 #pragma omp depobj(depobj),depend(in : dd[0])
525 #pragma omp parallel
527 if (p) {
528 #pragma omp cancel, parallel
530 } else {
531 #pragma omp cancellation point, parallel
535 #pragma omp scope, private (p), firstprivate (f), reduction(+:r), nowait, \
536 allocate(omp_default_mem_alloc: r)
538 #pragma omp scope, private (p), firstprivate (f), reduction(task, +:r), \
539 allocate (omp_default_mem_alloc: f)
541 extern int t2;
542 #pragma omp threadprivate (t2)
543 extern int t2;
544 #pragma omp declare reduction (dr: int: omp_out += omp_in),initializer (omp_priv = 0)
545 #pragma omp assume, no_openmp, no_openmp_routines, no_parallelism, \
546 absent (atomic, barrier, cancel, cancellation point), \
547 absent (critical, depobj), \
548 absent (distribute, flush, loop, masked, master, nothing, ordered), \
549 absent (parallel, scan, scope, section, sections, simd, single, task), \
550 absent (taskgroup, taskloop, taskwait, taskyield), \
551 absent (target, teams, for, error), holds (n1 < n2)
552 if (0)
554 #pragma omp assume, contains (simd)
555 #pragma omp for simd
556 for (int i = 0; i < 64; i++)
560 void corge1 ();
562 void
563 corge ()
565 #pragma omp declare variant (corge1),match (construct={parallel,for})
566 extern void corge2 ();
567 #pragma omp parallel
568 #pragma omp for
569 for (int i = 0; i < 5; i++)
570 corge2 ();
571 #pragma omp declare simd, simdlen(4),linear(l),aligned(p:4),uniform(p),inbranch
572 #pragma omp declare simd,simdlen(8),notinbranch
573 extern int corge3 (int l, int *p);
574 #pragma omp declare simd, simdlen(4),linear(l),aligned(p:4),uniform(p),inbranch
575 #pragma omp declare simd, simdlen(8),notinbranch
576 extern int corge4 (int l, int *p);
577 #pragma omp declare simd, simdlen(4),linear(l),aligned(p:4),uniform(p),inbranch
578 #pragma omp declare simd, simdlen(8),notinbranch
579 extern int corge5 (int l, int *p);
580 #pragma omp declare target
581 extern void corge6 ();
582 #pragma omp end declare target
586 garply (int a, int *c, int *d, int *e, int *f)
588 int i;
589 #pragma omp simd, reduction (inscan, +: a)
590 for (i = 0; i < 64; i++)
592 d[i] = a;
593 #pragma omp scan, exclusive (a)
594 a += c[i];
596 #pragma omp simd, reduction (inscan, +: a)
597 for (i = 0; i < 64; i++)
599 a += c[i];
600 #pragma omp scan inclusive (a)
601 d[i] = a;
603 return a;