1 | // RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s |
2 | |
3 | // RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s |
4 | |
5 | void foo(); |
6 | |
7 | int main(int argc, char **argv) { |
8 | #pragma omp task default // expected-error {{expected '(' after 'default'}} |
9 | #pragma omp task default( // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}} expected-error {{expected ')'}} expected-note {{to match this '('}} |
10 | #pragma omp task default() // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}} |
11 | #pragma omp task default(none // expected-error {{expected ')'}} expected-note {{to match this '('}} |
12 | #pragma omp task default(shared), default(shared) // expected-error {{directive '#pragma omp task' cannot contain more than one 'default' clause}} |
13 | #pragma omp task default(x) // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}} |
14 | foo(); |
15 | |
16 | #pragma omp task default(none) |
17 | ++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}} |
18 | |
19 | #pragma omp task default(none) |
20 | #pragma omp task default(shared) |
21 | ++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}} |
22 | return 0; |
23 | } |
24 | |