Avoid is_constant calls in vectorizable_bswap
[official-gcc.git] / libgomp / testsuite / libgomp.c-c++-common / for-3.c
blob173ce8ecc1364eec50b8df34cbdbaa260a6b2400
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 distribute
15 #define G d
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 #define F distribute
25 #define G d_ds128
26 #define S dist_schedule(static, 128)
27 #define N(x) M(x, G, normal)
28 #include "for-2.h"
29 #undef S
30 #undef N
31 #undef F
32 #undef G
34 #define F distribute simd
35 #define G ds
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 distribute simd
45 #define G ds_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 distribute parallel for
55 #define G dpf
56 #include "for-1.h"
57 #undef F
58 #undef G
60 #define F distribute parallel for dist_schedule(static, 128)
61 #define G dpf_ds128
62 #include "for-1.h"
63 #undef F
64 #undef G
66 #define F distribute parallel for simd
67 #define G dpfs
68 #include "for-1.h"
69 #undef F
70 #undef G
72 #define F distribute parallel for simd dist_schedule(static, 128)
73 #define G dpfs_ds128
74 #include "for-1.h"
75 #undef F
76 #undef G
78 #pragma omp end declare target
80 int
81 main ()
83 int err = 0;
84 #pragma omp target teams reduction(|:err)
86 err |= test_d_normal ();
87 err |= test_d_ds128_normal ();
88 err |= test_ds_normal ();
89 err |= test_ds_ds128_normal ();
90 err |= test_dpf_static ();
91 err |= test_dpf_static32 ();
92 err |= test_dpf_auto ();
93 err |= test_dpf_guided32 ();
94 err |= test_dpf_runtime ();
95 err |= test_dpf_ds128_static ();
96 err |= test_dpf_ds128_static32 ();
97 err |= test_dpf_ds128_auto ();
98 err |= test_dpf_ds128_guided32 ();
99 err |= test_dpf_ds128_runtime ();
100 err |= test_dpfs_static ();
101 err |= test_dpfs_static32 ();
102 err |= test_dpfs_auto ();
103 err |= test_dpfs_guided32 ();
104 err |= test_dpfs_runtime ();
105 err |= test_dpfs_ds128_static ();
106 err |= test_dpfs_ds128_static32 ();
107 err |= test_dpfs_ds128_auto ();
108 err |= test_dpfs_ds128_guided32 ();
109 err |= test_dpfs_ds128_runtime ();
111 if (err)
112 abort ();
113 return 0;