AVR: Assert minimal required bit width of section_common::flags.
[gcc.git] / libgomp / testsuite / libgomp.c / target-43.c
blob028e9120f2a3ee27a84b91904ab1fff68b5f647e
1 /* { dg-do run } */
2 /* { dg-additional-options "-foffload-options=nvptx-none=-latomic" { target { offload_target_nvptx } } } */
4 #include <stdlib.h>
6 #define N 32
7 #define TYPE char
9 int
10 main (void)
12 TYPE result = 1;
13 TYPE a[N];
14 for (int x = 0; x < N; ++x)
15 a[x] = 1;
17 #pragma omp target map(tofrom: result) map(to:a)
18 #pragma omp for simd reduction(&&:result)
19 for (int x = 0; x < N; ++x)
20 result = result && a[x];
22 if (result != 1)
23 abort ();
25 return 0;