Skip gnat.dg/prot7.adb on hppa.
[official-gcc.git] / libgomp / testsuite / libgomp.c-c++-common / for-6.c
blob64a754e51b888c24703bbda010749a7cda81db6b
1 /* { dg-additional-options "-std=gnu99" { target c } } */
3 extern
4 #ifdef __cplusplus
5 "C"
6 #endif
7 void abort ();
9 #define M(x, y, z) O(x, y, z)
10 #define O(x, y, z) x ## _ ## y ## _ ## z
12 #pragma omp declare target
14 #define F for
15 #define G f
16 #define S
17 #define N(x) M(x, G, normal)
18 #include "for-2.h"
19 #undef S
20 #undef N
21 #undef F
22 #undef G
24 #pragma omp end declare target
26 #undef OMPTGT
27 #undef OMPFROM
28 #undef OMPTO
29 #define DO_PRAGMA(x) _Pragma (#x)
30 #define OMPTGT DO_PRAGMA (omp target)
31 #define OMPFROM(v) DO_PRAGMA (omp target update from(v))
32 #define OMPTO(v) DO_PRAGMA (omp target update to(v))
34 #define F teams distribute
35 #define G td
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 teams distribute
45 #define G td_ds128
46 #define S dist_schedule(static, 128)
47 #define N(x) M(x, G, normal)
48 #include "for-2.h"
49 #undef S
50 #undef N
51 #undef F
52 #undef G
54 #define F teams distribute simd
55 #define G tds
56 #define S
57 #define N(x) M(x, G, normal)
58 #include "for-2.h"
59 #undef S
60 #undef N
61 #undef F
62 #undef G
64 #define F teams distribute simd
65 #define G tds_ds128
66 #define S dist_schedule(static, 128)
67 #define N(x) M(x, G, normal)
68 #include "for-2.h"
69 #undef S
70 #undef N
71 #undef F
72 #undef G
74 #define F teams distribute parallel for
75 #define G tdpf
76 #include "for-1.h"
77 #undef F
78 #undef G
80 #define F teams distribute parallel for dist_schedule(static, 128)
81 #define G tdpf_ds128
82 #include "for-1.h"
83 #undef F
84 #undef G
86 #define F teams distribute parallel for simd
87 #define G tdpfs
88 #include "for-1.h"
89 #undef F
90 #undef G
92 #define F teams distribute parallel for simd dist_schedule(static, 128)
93 #define G tdpfs_ds128
94 #include "for-1.h"
95 #undef F
96 #undef G
98 int
99 main ()
101 if (test_td_normal ()
102 || test_td_ds128_normal ()
103 || test_tds_normal ()
104 || test_tds_ds128_normal ()
105 || test_tdpf_static ()
106 || test_tdpf_static32 ()
107 || test_tdpf_auto ()
108 || test_tdpf_guided32 ()
109 || test_tdpf_runtime ()
110 || test_tdpf_ds128_static ()
111 || test_tdpf_ds128_static32 ()
112 || test_tdpf_ds128_auto ()
113 || test_tdpf_ds128_guided32 ()
114 || test_tdpf_ds128_runtime ()
115 || test_tdpfs_static ()
116 || test_tdpfs_static32 ()
117 || test_tdpfs_auto ()
118 || test_tdpfs_guided32 ()
119 || test_tdpfs_runtime ()
120 || test_tdpfs_ds128_static ()
121 || test_tdpfs_ds128_static32 ()
122 || test_tdpfs_ds128_auto ()
123 || test_tdpfs_ds128_guided32 ()
124 || test_tdpfs_ds128_runtime ())
125 abort ();
126 return 0;