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 parallel sections default // expected-error {{expected '(' after 'default'}} |
9 | { |
10 | #pragma omp parallel sections default( // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}} expected-error {{expected ')'}} expected-note {{to match this '('}} |
11 | { |
12 | #pragma omp parallel sections default() // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}} |
13 | { |
14 | #pragma omp parallel sections default(none // expected-error {{expected ')'}} expected-note {{to match this '('}} |
15 | { |
16 | #pragma omp parallel sections default(shared), default(shared) // expected-error {{directive '#pragma omp parallel sections' cannot contain more than one 'default' clause}} |
17 | { |
18 | #pragma omp parallel sections default(x) // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}} |
19 | { |
20 | foo(); |
21 | } |
22 | } |
23 | } |
24 | } |
25 | } |
26 | } |
27 | |
28 | #pragma omp parallel sections default(none) |
29 | { |
30 | ++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}} |
31 | } |
32 | |
33 | #pragma omp parallel sections default(none) |
34 | { |
35 | #pragma omp parallel sections default(shared) |
36 | { |
37 | ++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}} |
38 | } |
39 | } |
40 | return 0; |
41 | } |
42 | |