1 // RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s -Wuninitialized
3 // RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s -Wuninitialized
12 const int da
[5] = { 0 };
23 #pragma omp target simd is_device_ptr // expected-error {{expected '(' after 'is_device_ptr'}}
24 for (int ii
=0; ii
<10; ii
++)
26 #pragma omp target simd is_device_ptr( // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{expected expression}}
27 for (int ii
=0; ii
<10; ii
++)
29 #pragma omp target simd is_device_ptr() // expected-error {{expected expression}}
30 for (int ii
=0; ii
<10; ii
++)
32 #pragma omp target simd is_device_ptr(alloc) // expected-error {{use of undeclared identifier 'alloc'}}
33 for (int ii
=0; ii
<10; ii
++)
35 #pragma omp target simd is_device_ptr(arg // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{expected pointer, array, reference to pointer, or reference to array in 'is_device_ptr clause'}}
36 for (int ii
=0; ii
<10; ii
++)
38 #pragma omp target simd is_device_ptr(i) // expected-error {{expected pointer, array, reference to pointer, or reference to array in 'is_device_ptr clause'}}
39 for (int ii
=0; ii
<10; ii
++)
41 #pragma omp target simd is_device_ptr(j) // expected-error {{expected pointer, array, reference to pointer, or reference to array in 'is_device_ptr clause'}}
42 for (int ii
=0; ii
<10; ii
++)
44 #pragma omp target simd is_device_ptr(k) // OK
45 for (int ii
=0; ii
<10; ii
++)
47 #pragma omp target simd is_device_ptr(z) // OK
48 for (int ii
=0; ii
<10; ii
++)
50 #pragma omp target simd is_device_ptr(aa) // OK
51 for (int ii
=0; ii
<10; ii
++)
53 #pragma omp target simd is_device_ptr(raa) // OK
54 for (int ii
=0; ii
<10; ii
++)
56 #pragma omp target simd is_device_ptr(e) // expected-error{{expected pointer, array, reference to pointer, or reference to array in 'is_device_ptr clause'}}
57 for (int ii
=0; ii
<10; ii
++)
59 #pragma omp target simd is_device_ptr(g) // OK
60 for (int ii
=0; ii
<10; ii
++)
62 #pragma omp target simd is_device_ptr(rg) // OK
63 for (int ii
=0; ii
<10; ii
++)
65 #pragma omp target simd is_device_ptr(k,i,j) // expected-error2 {{expected pointer, array, reference to pointer, or reference to array in 'is_device_ptr clause'}}
66 for (int ii
=0; ii
<10; ii
++)
68 #pragma omp target simd is_device_ptr(d) // expected-error{{expected pointer, array, reference to pointer, or reference to array in 'is_device_ptr clause'}}
69 for (int ii
=0; ii
<10; ii
++)
71 #pragma omp target simd is_device_ptr(da) // OK
72 for (int ii
=0; ii
<10; ii
++)
99 SC(SB
*&_RPtrS
) : RPtrS(_RPtrS
) {}
113 S2(S2
&s2
):a(s2
.a
) { }
115 static const float S2sc
;
117 const float S2::S2sc
= 0;
124 S3(S3
&s3
):a(s3
.a
) { }
139 S5(const S5
&s5
):a(s5
.a
) { }
145 #pragma omp threadprivate(h)
151 template <typename T
, int I
>
154 const T da
[5] = { 0 };
165 #pragma omp target simd is_device_ptr // expected-error {{expected '(' after 'is_device_ptr'}}
166 for (int kk
=0; kk
<20; kk
++)
168 #pragma omp target simd is_device_ptr( // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{expected expression}}
169 for (int kk
=0; kk
<20; kk
++)
171 #pragma omp target simd is_device_ptr() // expected-error {{expected expression}}
172 for (int kk
=0; kk
<20; kk
++)
174 #pragma omp target simd is_device_ptr(alloc) // expected-error {{use of undeclared identifier 'alloc'}}
175 for (int kk
=0; kk
<20; kk
++)
177 #pragma omp target simd is_device_ptr(argc // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error{{expected pointer, array, reference to pointer, or reference to array in 'is_device_ptr clause'}}
178 for (int kk
=0; kk
<20; kk
++)
180 #pragma omp target simd is_device_ptr(i) // expected-error {{expected pointer, array, reference to pointer, or reference to array in 'is_device_ptr clause'}}
181 for (int kk
=0; kk
<20; kk
++)
183 #pragma omp target simd is_device_ptr(j) // expected-error {{expected pointer, array, reference to pointer, or reference to array in 'is_device_ptr clause'}}
184 for (int kk
=0; kk
<20; kk
++)
186 #pragma omp target simd is_device_ptr(k) // OK
187 for (int kk
=0; kk
<20; kk
++)
189 #pragma omp target simd is_device_ptr(z) // OK
190 for (int kk
=0; kk
<20; kk
++)
192 #pragma omp target simd is_device_ptr(aa) // OK
193 for (int kk
=0; kk
<20; kk
++)
195 #pragma omp target simd is_device_ptr(raa) // OK
196 for (int kk
=0; kk
<20; kk
++)
198 #pragma omp target simd is_device_ptr(e) // expected-error{{expected pointer, array, reference to pointer, or reference to array in 'is_device_ptr clause'}}
199 for (int kk
=0; kk
<20; kk
++)
201 #pragma omp target simd is_device_ptr(g) // expected-error{{expected pointer, array, reference to pointer, or reference to array in 'is_device_ptr clause'}}
202 for (int kk
=0; kk
<20; kk
++)
204 #pragma omp target simd is_device_ptr(h) // OK
205 for (int kk
=0; kk
<20; kk
++)
207 #pragma omp target simd is_device_ptr(rh) // OK
208 for (int kk
=0; kk
<20; kk
++)
210 #pragma omp target simd is_device_ptr(k,i,j) // expected-error2 {{expected pointer, array, reference to pointer, or reference to array in 'is_device_ptr clause'}}
211 for (int kk
=0; kk
<20; kk
++)
213 #pragma omp target simd is_device_ptr(d) // expected-error{{expected pointer, array, reference to pointer, or reference to array in 'is_device_ptr clause'}}
214 for (int kk
=0; kk
<20; kk
++)
216 #pragma omp target simd is_device_ptr(da) // OK
217 for (int kk
=0; kk
<20; kk
++)
222 int main(int argc
, char **argv
) {
224 const int da
[5] = { 0 };
235 #pragma omp target simd is_device_ptr // expected-error {{expected '(' after 'is_device_ptr'}}
236 for (int kk
=0; kk
<20; kk
++)
238 #pragma omp target simd is_device_ptr( // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{expected expression}}
239 for (int kk
=0; kk
<20; kk
++)
241 #pragma omp target simd is_device_ptr() // expected-error {{expected expression}}
242 for (int kk
=0; kk
<20; kk
++)
244 #pragma omp target simd is_device_ptr(alloc) // expected-error {{use of undeclared identifier 'alloc'}}
245 for (int kk
=0; kk
<20; kk
++)
247 #pragma omp target simd is_device_ptr(argc // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{expected pointer, array, reference to pointer, or reference to array in 'is_device_ptr clause'}}
248 for (int kk
=0; kk
<20; kk
++)
250 #pragma omp target simd is_device_ptr(i) // expected-error {{expected pointer, array, reference to pointer, or reference to array in 'is_device_ptr clause'}}
251 for (int kk
=0; kk
<20; kk
++)
253 #pragma omp target simd is_device_ptr(j) // expected-error {{expected pointer, array, reference to pointer, or reference to array in 'is_device_ptr clause'}}
254 for (int kk
=0; kk
<20; kk
++)
256 #pragma omp target simd is_device_ptr(k) // OK
257 for (int kk
=0; kk
<20; kk
++)
259 #pragma omp target simd is_device_ptr(z) // OK
260 for (int kk
=0; kk
<20; kk
++)
262 #pragma omp target simd is_device_ptr(aa) // OK
263 for (int kk
=0; kk
<20; kk
++)
265 #pragma omp target simd is_device_ptr(raa) // OK
266 for (int kk
=0; kk
<20; kk
++)
268 #pragma omp target simd is_device_ptr(e) // expected-error{{expected pointer, array, reference to pointer, or reference to array in 'is_device_ptr clause'}}
269 for (int kk
=0; kk
<20; kk
++)
271 #pragma omp target simd is_device_ptr(g) // expected-error{{expected pointer, array, reference to pointer, or reference to array in 'is_device_ptr clause'}}
272 for (int kk
=0; kk
<20; kk
++)
274 #pragma omp target simd is_device_ptr(h) // OK
275 for (int kk
=0; kk
<20; kk
++)
277 #pragma omp target simd is_device_ptr(rh) // OK
278 for (int kk
=0; kk
<20; kk
++)
280 #pragma omp target simd is_device_ptr(k,i,j) // expected-error2 {{expected pointer, array, reference to pointer, or reference to array in 'is_device_ptr clause'}}
281 for (int kk
=0; kk
<20; kk
++)
283 #pragma omp target simd is_device_ptr(d) // expected-error{{expected pointer, array, reference to pointer, or reference to array in 'is_device_ptr clause'}}
284 for (int kk
=0; kk
<20; kk
++)
286 #pragma omp target simd is_device_ptr(da) // OK
287 for (int kk
=0; kk
<20; kk
++)
289 return tmain
<int, 3>(argc
); // expected-note {{in instantiation of function template specialization 'tmain<int, 3>' requested here}}