Skip various cmp-mem-const tests on lp64 hppa*-*-*
[official-gcc.git] / libgomp / testsuite / libgomp.c-c++-common / for-16.c
blob5649ba9ee874758ee54d7a44eeb78a1d41271a0c
1 extern
2 #ifdef __cplusplus
3 "C"
4 #endif
5 void abort (void);
7 unsigned long long int k = 16;
8 #pragma omp declare target to (k)
10 int
11 main ()
13 unsigned char a[144], b[144], c[144];
14 int l;
15 #pragma omp target map(from:a, b, c)
17 int i;
18 unsigned long long int j;
19 #pragma omp parallel for schedule (runtime)
20 for (i = 0; i < 16; i++)
21 a[i] = i;
22 #pragma omp parallel for schedule (monotonic: runtime)
23 for (i = 0; i < 16; i++)
24 a[i + 16] = i + 16;
25 #pragma omp parallel for schedule (nonmonotonic: runtime)
26 for (i = 0; i < 16; i++)
27 a[i + 32] = i + 32;
28 #pragma omp parallel
30 #pragma omp for schedule (runtime)
31 for (i = 0; i < 16; i++)
32 a[i + 48] = i + 48;
33 #pragma omp for schedule (monotonic: runtime)
34 for (i = 0; i < 16; i++)
35 a[i + 64] = i + 64;
36 #pragma omp for schedule (nonmonotonic: runtime)
37 for (i = 0; i < 16; i++)
38 a[i + 80] = i + 80;
39 #pragma omp for schedule (runtime)
40 for (j = 0; j < k; j++)
41 a[j + 96] = j + 96;
42 #pragma omp for schedule (monotonic: runtime)
43 for (j = 0; j < k; j++)
44 a[j + 112] = j + 112;
45 #pragma omp for schedule (nonmonotonic: runtime)
46 for (j = 0; j < k; j++)
47 a[j + 128] = j + 128;
49 #pragma omp parallel for schedule (dynamic)
50 for (i = 0; i < 16; i++)
51 b[i] = i;
52 #pragma omp parallel for schedule (monotonic: dynamic)
53 for (i = 0; i < 16; i++)
54 b[i + 16] = i + 16;
55 #pragma omp parallel for schedule (nonmonotonic: dynamic)
56 for (i = 0; i < 16; i++)
57 b[i + 32] = i + 32;
58 #pragma omp parallel
60 #pragma omp for schedule (dynamic)
61 for (i = 0; i < 16; i++)
62 b[i + 48] = i + 48;
63 #pragma omp for schedule (monotonic: dynamic)
64 for (i = 0; i < 16; i++)
65 b[i + 64] = i + 64;
66 #pragma omp for schedule (nonmonotonic: dynamic)
67 for (i = 0; i < 16; i++)
68 b[i + 80] = i + 80;
69 #pragma omp for schedule (dynamic)
70 for (j = 0; j < k; j++)
71 b[j + 96] = j + 96;
72 #pragma omp for schedule (monotonic: dynamic)
73 for (j = 0; j < k; j++)
74 b[j + 112] = j + 112;
75 #pragma omp for schedule (nonmonotonic: dynamic)
76 for (j = 0; j < k; j++)
77 b[j + 128] = j + 128;
79 #pragma omp parallel for schedule (guided)
80 for (i = 0; i < 16; i++)
81 c[i] = i;
82 #pragma omp parallel for schedule (monotonic: guided)
83 for (i = 0; i < 16; i++)
84 c[i + 16] = i + 16;
85 #pragma omp parallel for schedule (nonmonotonic: guided)
86 for (i = 0; i < 16; i++)
87 c[i + 32] = i + 32;
88 #pragma omp parallel
90 #pragma omp for schedule (guided)
91 for (i = 0; i < 16; i++)
92 c[i + 48] = i + 48;
93 #pragma omp for schedule (monotonic: guided)
94 for (i = 0; i < 16; i++)
95 c[i + 64] = i + 64;
96 #pragma omp for schedule (nonmonotonic: guided)
97 for (i = 0; i < 16; i++)
98 c[i + 80] = i + 80;
99 #pragma omp for schedule (guided)
100 for (j = 0; j < k; j++)
101 c[j + 96] = j + 96;
102 #pragma omp for schedule (monotonic: guided)
103 for (j = 0; j < k; j++)
104 c[j + 112] = j + 112;
105 #pragma omp for schedule (nonmonotonic: guided)
106 for (j = 0; j < k; j++)
107 c[j + 128] = j + 128;
110 for (l = 0; l < 144; ++l)
111 if (a[l] != l || b[l] != l || c[l] != l)
112 abort ();
113 return 0;