PR testsuite/85483: Move aarch64/sve/vcond_1.c test to g++.dg/other/
[official-gcc.git] / libgomp / testsuite / libgomp.c / for-5.c
blob84e636ab0f98e48b447d8a4b3c123ec19a28d642
1 /* { dg-additional-options "-std=gnu99" } */
3 extern void abort ();
5 #define M(x, y, z) O(x, y, z)
6 #define O(x, y, z) x ## _ ## y ## _ ## z
8 #pragma omp declare target
10 #define F for
11 #define G f
12 #define S
13 #define N(x) M(x, G, normal)
14 #include "for-2.h"
15 #undef S
16 #undef N
17 #undef F
18 #undef G
20 #pragma omp end declare target
22 #undef OMPFROM
23 #undef OMPTO
24 #define DO_PRAGMA(x) _Pragma (#x)
25 #define OMPFROM(v) DO_PRAGMA (omp target update from(v))
26 #define OMPTO(v) DO_PRAGMA (omp target update to(v))
28 #define F target parallel for
29 #define G tpf
30 #include "for-1.h"
31 #undef F
32 #undef G
34 #define F target simd
35 #define G t_simd
36 #define S
37 #define N(x) M(x, G, normal)
38 #include "for-2.h"
39 #undef S
40 #undef N
41 #undef F
42 #undef G
44 #define F target parallel for simd
45 #define G tpf_simd
46 #include "for-1.h"
47 #undef F
48 #undef G
50 #define F target teams distribute
51 #define G ttd
52 #define S
53 #define N(x) M(x, G, normal)
54 #include "for-2.h"
55 #undef S
56 #undef N
57 #undef F
58 #undef G
60 #define F target teams distribute
61 #define G ttd_ds128
62 #define S dist_schedule(static, 128)
63 #define N(x) M(x, G, normal)
64 #include "for-2.h"
65 #undef S
66 #undef N
67 #undef F
68 #undef G
70 #define F target teams distribute simd
71 #define G ttds
72 #define S
73 #define N(x) M(x, G, normal)
74 #include "for-2.h"
75 #undef S
76 #undef N
77 #undef F
78 #undef G
80 #define F target teams distribute simd
81 #define G ttds_ds128
82 #define S dist_schedule(static, 128)
83 #define N(x) M(x, G, normal)
84 #include "for-2.h"
85 #undef S
86 #undef N
87 #undef F
88 #undef G
90 #define F target teams distribute parallel for
91 #define G ttdpf
92 #include "for-1.h"
93 #undef F
94 #undef G
96 #define F target teams distribute parallel for dist_schedule(static, 128)
97 #define G ttdpf_ds128
98 #include "for-1.h"
99 #undef F
100 #undef G
102 #define F target teams distribute parallel for simd
103 #define G ttdpfs
104 #include "for-1.h"
105 #undef F
106 #undef G
108 #define F target teams distribute parallel for simd dist_schedule(static, 128)
109 #define G ttdpfs_ds128
110 #include "for-1.h"
111 #undef F
112 #undef G
115 main ()
117 if (test_tpf_static ()
118 || test_tpf_static32 ()
119 || test_tpf_auto ()
120 || test_tpf_guided32 ()
121 || test_tpf_runtime ()
122 || test_t_simd_normal ()
123 || test_tpf_simd_static ()
124 || test_tpf_simd_static32 ()
125 || test_tpf_simd_auto ()
126 || test_tpf_simd_guided32 ()
127 || test_tpf_simd_runtime ()
128 || test_ttd_normal ()
129 || test_ttd_ds128_normal ()
130 || test_ttds_normal ()
131 || test_ttds_ds128_normal ()
132 || test_ttdpf_static ()
133 || test_ttdpf_static32 ()
134 || test_ttdpf_auto ()
135 || test_ttdpf_guided32 ()
136 || test_ttdpf_runtime ()
137 || test_ttdpf_ds128_static ()
138 || test_ttdpf_ds128_static32 ()
139 || test_ttdpf_ds128_auto ()
140 || test_ttdpf_ds128_guided32 ()
141 || test_ttdpf_ds128_runtime ()
142 || test_ttdpfs_static ()
143 || test_ttdpfs_static32 ()
144 || test_ttdpfs_auto ()
145 || test_ttdpfs_guided32 ()
146 || test_ttdpfs_runtime ()
147 || test_ttdpfs_ds128_static ()
148 || test_ttdpfs_ds128_static32 ()
149 || test_ttdpfs_ds128_auto ()
150 || test_ttdpfs_ds128_guided32 ()
151 || test_ttdpfs_ds128_runtime ())
152 abort ();
153 return 0;