blob: 83909ccfe051cec4c64b5c9db7babc02d2c4066a [file] [log] [blame]
Alexey Bataevdb390212015-05-20 04:24:19 +00001// RUN: %clang_cc1 -verify -fopenmp -o - %s
Alexey Bataev13314bf2014-10-09 04:18:56 +00002
3void foo();
4
5int main(int argc, char **argv) {
6 #pragma omp target
7 #pragma omp teams default // expected-error {{expected '(' after 'default'}}
8 foo();
9 #pragma omp target
10 #pragma omp teams default ( // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
11 foo();
12 #pragma omp target
13 #pragma omp teams default () // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}}
14 foo();
15 #pragma omp target
16 #pragma omp teams default (none // expected-error {{expected ')'}} expected-note {{to match this '('}}
17 foo();
18 #pragma omp target
19 #pragma omp teams default (shared), default(shared) // expected-error {{directive '#pragma omp teams' cannot contain more than one 'default' clause}}
20 foo();
21 #pragma omp target
22 #pragma omp teams default (x) // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}}
23 foo();
24
25 #pragma omp target
26 #pragma omp teams default(none)
27 ++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
28
29 #pragma omp target
30 #pragma omp teams default(none)
31 #pragma omp parallel default(shared)
32 ++argc;
33 return 0;
34}