2019-07-08 23:45:24 +08:00
|
|
|
// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
|
2016-12-25 12:52:54 +08:00
|
|
|
|
2019-07-08 23:45:24 +08:00
|
|
|
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
|
2017-12-30 02:07:07 +08:00
|
|
|
|
2016-12-25 12:52:54 +08:00
|
|
|
void foo() {
|
|
|
|
}
|
|
|
|
|
|
|
|
template <class T, typename S, int N, int ST>
|
|
|
|
T tmain(T argc, S **argv) {
|
|
|
|
int i;
|
|
|
|
#pragma omp target teams distribute defaultmap // expected-error {{expected '(' after 'defaultmap'}}
|
|
|
|
for (i = 0; i < argc; ++i) foo();
|
|
|
|
#pragma omp target teams distribute defaultmap ( // expected-error {{expected 'tofrom' in OpenMP clause 'defaultmap'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
|
|
|
|
for (i = 0; i < argc; ++i) foo();
|
|
|
|
#pragma omp target teams distribute defaultmap () // expected-error {{expected 'tofrom' in OpenMP clause 'defaultmap'}}
|
|
|
|
for (i = 0; i < argc; ++i) foo();
|
|
|
|
#pragma omp target teams distribute defaultmap (tofrom // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-warning {{missing ':' after defaultmap modifier - ignoring}} expected-error {{expected 'scalar' in OpenMP clause 'defaultmap'}}
|
|
|
|
for (i = 0; i < argc; ++i) foo();
|
|
|
|
#pragma omp target teams distribute defaultmap (tofrom: // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{expected 'scalar' in OpenMP clause 'defaultmap'}}
|
|
|
|
for (i = 0; i < argc; ++i) foo();
|
|
|
|
#pragma omp target teams distribute defaultmap (tofrom) // expected-warning {{missing ':' after defaultmap modifier - ignoring}} expected-error {{expected 'scalar' in OpenMP clause 'defaultmap'}}
|
|
|
|
for (i = 0; i < argc; ++i) foo();
|
|
|
|
#pragma omp target teams distribute defaultmap (tofrom scalar) // expected-warning {{missing ':' after defaultmap modifier - ignoring}}
|
|
|
|
for (i = 0; i < argc; ++i) foo();
|
|
|
|
#pragma omp target teams distribute defaultmap (tofrom, // expected-error {{expected ')'}} expected-error {{expected 'scalar' in OpenMP clause 'defaultmap'}} expected-warning {{missing ':' after defaultmap modifier - ignoring}} expected-note {{to match this '('}}
|
|
|
|
for (i = 0; i < argc; ++i) foo();
|
|
|
|
#pragma omp target teams distribute defaultmap (scalar: // expected-error {{expected ')'}} expected-error {{expected 'tofrom' in OpenMP clause 'defaultmap'}} expected-note {{to match this '('}}
|
|
|
|
for (i = 0; i < argc; ++i) foo();
|
|
|
|
#pragma omp target teams distribute defaultmap (tofrom, scalar // expected-error {{expected ')'}} expected-warning {{missing ':' after defaultmap modifier - ignoring}} expected-error {{expected 'scalar' in OpenMP clause 'defaultmap'}} expected-note {{to match this '('}}
|
|
|
|
for (i = 0; i < argc; ++i) foo();
|
|
|
|
|
|
|
|
return argc;
|
|
|
|
}
|
|
|
|
|
|
|
|
int main(int argc, char **argv) {
|
|
|
|
int i;
|
|
|
|
#pragma omp target teams distribute defaultmap // expected-error {{expected '(' after 'defaultmap'}}
|
|
|
|
for (i = 0; i < argc; ++i) foo();
|
|
|
|
#pragma omp target teams distribute defaultmap ( // expected-error {{expected 'tofrom' in OpenMP clause 'defaultmap'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
|
|
|
|
for (i = 0; i < argc; ++i) foo();
|
|
|
|
#pragma omp target teams distribute defaultmap () // expected-error {{expected 'tofrom' in OpenMP clause 'defaultmap'}}
|
|
|
|
for (i = 0; i < argc; ++i) foo();
|
|
|
|
#pragma omp target teams distribute defaultmap (tofrom // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-warning {{missing ':' after defaultmap modifier - ignoring}} expected-error {{expected 'scalar' in OpenMP clause 'defaultmap'}}
|
|
|
|
for (i = 0; i < argc; ++i) foo();
|
|
|
|
#pragma omp target teams distribute defaultmap (tofrom: // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{expected 'scalar' in OpenMP clause 'defaultmap'}}
|
|
|
|
for (i = 0; i < argc; ++i) foo();
|
|
|
|
#pragma omp target teams distribute defaultmap (tofrom) // expected-warning {{missing ':' after defaultmap modifier - ignoring}} expected-error {{expected 'scalar' in OpenMP clause 'defaultmap'}}
|
|
|
|
for (i = 0; i < argc; ++i) foo();
|
|
|
|
#pragma omp target teams distribute defaultmap (tofrom scalar) // expected-warning {{missing ':' after defaultmap modifier - ignoring}}
|
|
|
|
for (i = 0; i < argc; ++i) foo();
|
|
|
|
#pragma omp target teams distribute defaultmap (tofrom, // expected-error {{expected ')'}} expected-error {{expected 'scalar' in OpenMP clause 'defaultmap'}} expected-warning {{missing ':' after defaultmap modifier - ignoring}} expected-note {{to match this '('}}
|
|
|
|
for (i = 0; i < argc; ++i) foo();
|
|
|
|
#pragma omp target teams distribute defaultmap (scalar: // expected-error {{expected ')'}} expected-error {{expected 'tofrom' in OpenMP clause 'defaultmap'}} expected-note {{to match this '('}}
|
|
|
|
for (i = 0; i < argc; ++i) foo();
|
|
|
|
#pragma omp target teams distribute defaultmap (tofrom, scalar // expected-error {{expected ')'}} expected-warning {{missing ':' after defaultmap modifier - ignoring}} expected-error {{expected 'scalar' in OpenMP clause 'defaultmap'}} expected-note {{to match this '('}}
|
|
|
|
for (i = 0; i < argc; ++i) foo();
|
|
|
|
|
|
|
|
return tmain<int, char, 1, 0>(argc, argv);
|
|
|
|
}
|
|
|
|
|