* c-c++-common/Wrestrict.c (test_strcpy_range): Revert latest change.
[official-gcc.git] / libgomp / testsuite / libgomp.c / for-6.c
blob7f3c65e82b13f01334b2187789a30cabde92d699
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 OMPTGT
23 #undef OMPFROM
24 #undef OMPTO
25 #define DO_PRAGMA(x) _Pragma (#x)
26 #define OMPTGT DO_PRAGMA (omp target)
27 #define OMPFROM(v) DO_PRAGMA (omp target update from(v))
28 #define OMPTO(v) DO_PRAGMA (omp target update to(v))
30 #define F teams distribute
31 #define G td
32 #define S
33 #define N(x) M(x, G, normal)
34 #include "for-2.h"
35 #undef S
36 #undef N
37 #undef F
38 #undef G
40 #define F teams distribute
41 #define G td_ds128
42 #define S dist_schedule(static, 128)
43 #define N(x) M(x, G, normal)
44 #include "for-2.h"
45 #undef S
46 #undef N
47 #undef F
48 #undef G
50 #define F teams distribute simd
51 #define G tds
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 teams distribute simd
61 #define G tds_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 teams distribute parallel for
71 #define G tdpf
72 #include "for-1.h"
73 #undef F
74 #undef G
76 #define F teams distribute parallel for dist_schedule(static, 128)
77 #define G tdpf_ds128
78 #include "for-1.h"
79 #undef F
80 #undef G
82 #define F teams distribute parallel for simd
83 #define G tdpfs
84 #include "for-1.h"
85 #undef F
86 #undef G
88 #define F teams distribute parallel for simd dist_schedule(static, 128)
89 #define G tdpfs_ds128
90 #include "for-1.h"
91 #undef F
92 #undef G
94 int
95 main ()
97 if (test_td_normal ()
98 || test_td_ds128_normal ()
99 || test_tds_normal ()
100 || test_tds_ds128_normal ()
101 || test_tdpf_static ()
102 || test_tdpf_static32 ()
103 || test_tdpf_auto ()
104 || test_tdpf_guided32 ()
105 || test_tdpf_runtime ()
106 || test_tdpf_ds128_static ()
107 || test_tdpf_ds128_static32 ()
108 || test_tdpf_ds128_auto ()
109 || test_tdpf_ds128_guided32 ()
110 || test_tdpf_ds128_runtime ()
111 || test_tdpfs_static ()
112 || test_tdpfs_static32 ()
113 || test_tdpfs_auto ()
114 || test_tdpfs_guided32 ()
115 || test_tdpfs_runtime ()
116 || test_tdpfs_ds128_static ()
117 || test_tdpfs_ds128_static32 ()
118 || test_tdpfs_ds128_auto ()
119 || test_tdpfs_ds128_guided32 ()
120 || test_tdpfs_ds128_runtime ())
121 abort ();
122 return 0;