2019-11-16 02:02:06 +08:00
|
|
|
// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=50 %s -verify=expected,omp5 -Wuninitialized -DOMP5
|
|
|
|
// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=50 %s -verify=expected,omp5 -Wuninitialized -DOMP5
|
2016-02-03 23:46:42 +08:00
|
|
|
|
2019-11-16 02:02:06 +08:00
|
|
|
// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s -verify=expected,omp45 -Wuninitialized
|
|
|
|
// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s -verify=expected,omp45 -Wuninitialized
|
2017-12-30 02:07:07 +08:00
|
|
|
|
2016-02-03 23:46:42 +08:00
|
|
|
void foo() {
|
|
|
|
}
|
|
|
|
|
|
|
|
template <class T, typename S, int N, int ST>
|
|
|
|
T tmain(T argc, S **argv) {
|
|
|
|
int i;
|
|
|
|
#pragma omp target parallel for defaultmap // expected-error {{expected '(' after 'defaultmap'}}
|
|
|
|
for (i = 0; i < argc; ++i) foo();
|
2020-04-09 03:19:54 +08:00
|
|
|
#pragma omp target parallel for defaultmap( // omp5-error {{expected 'alloc', 'from', 'to', 'tofrom', 'firstprivate', 'none', 'default' in OpenMP clause 'defaultmap'}} expected-error {{expected ')'}} expected-note {{to match this '('}} omp45-error {{expected 'tofrom' in OpenMP clause 'defaultmap'}}
|
2016-02-03 23:46:42 +08:00
|
|
|
for (i = 0; i < argc; ++i) foo();
|
2020-04-09 03:19:54 +08:00
|
|
|
#pragma omp target parallel for defaultmap() // omp5-error {{expected 'alloc', 'from', 'to', 'tofrom', 'firstprivate', 'none', 'default' in OpenMP clause 'defaultmap'}} omp45-error {{expected 'tofrom' in OpenMP clause 'defaultmap'}}
|
2016-02-03 23:46:42 +08:00
|
|
|
for (i = 0; i < argc; ++i) foo();
|
2020-04-09 03:19:54 +08:00
|
|
|
#pragma omp target parallel for defaultmap(tofrom // expected-error {{expected ')'}} expected-note {{to match this '('}} omp45-warning {{missing ':' after defaultmap modifier - ignoring}} omp45-error {{expected 'scalar' in OpenMP clause 'defaultmap'}}
|
2016-02-03 23:46:42 +08:00
|
|
|
for (i = 0; i < argc; ++i) foo();
|
2019-11-16 02:02:06 +08:00
|
|
|
#pragma omp target parallel for defaultmap (tofrom: // expected-error {{expected ')'}} expected-note {{to match this '('}} omp5-error {{expected 'scalar', 'aggregate', 'pointer' in OpenMP clause 'defaultmap'}} omp45-error {{expected 'scalar' in OpenMP clause 'defaultmap'}}
|
2016-02-03 23:46:42 +08:00
|
|
|
for (i = 0; i < argc; ++i) foo();
|
2020-04-09 03:19:54 +08:00
|
|
|
#pragma omp target parallel for defaultmap(tofrom) // omp45-warning {{missing ':' after defaultmap modifier - ignoring}} omp45-error {{expected 'scalar' in OpenMP clause 'defaultmap'}}
|
2016-02-03 23:46:42 +08:00
|
|
|
for (i = 0; i < argc; ++i) foo();
|
2020-04-09 03:19:54 +08:00
|
|
|
#pragma omp target parallel for defaultmap(tofrom scalar) // omp45-warning {{missing ':' after defaultmap modifier - ignoring}} omp5-error {{expected ')'}} omp5-note {{to match this '('}}
|
2016-02-03 23:46:42 +08:00
|
|
|
for (i = 0; i < argc; ++i) foo();
|
2020-04-09 03:19:54 +08:00
|
|
|
#pragma omp target parallel for defaultmap(tofrom, // expected-error {{expected ')'}} omp45-warning {{missing ':' after defaultmap modifier - ignoring}} expected-note {{to match this '('}} omp45-error {{expected 'scalar' in OpenMP clause 'defaultmap'}}
|
2016-02-03 23:46:42 +08:00
|
|
|
for (i = 0; i < argc; ++i) foo();
|
2019-11-16 02:02:06 +08:00
|
|
|
#pragma omp target parallel for defaultmap (scalar: // expected-error {{expected ')'}} omp5-error {{expected 'scalar', 'aggregate', 'pointer' in OpenMP clause 'defaultmap'}} omp5-error {{expected 'alloc', 'from', 'to', 'tofrom', 'firstprivate', 'none', 'default' in OpenMP clause 'defaultmap'}} expected-note {{to match this '('}} omp45-error {{expected 'tofrom' in OpenMP clause 'defaultmap'}}
|
2016-02-03 23:46:42 +08:00
|
|
|
for (i = 0; i < argc; ++i) foo();
|
2020-04-09 03:19:54 +08:00
|
|
|
#pragma omp target parallel for defaultmap(tofrom, scalar // expected-error {{expected ')'}} omp45-warning {{missing ':' after defaultmap modifier - ignoring}} expected-note {{to match this '('}} omp45-error {{expected 'scalar' in OpenMP clause 'defaultmap'}}
|
2016-02-03 23:46:42 +08:00
|
|
|
for (i = 0; i < argc; ++i) foo();
|
|
|
|
|
|
|
|
return argc;
|
|
|
|
}
|
|
|
|
|
|
|
|
int main(int argc, char **argv) {
|
|
|
|
int i;
|
|
|
|
#pragma omp target parallel for defaultmap // expected-error {{expected '(' after 'defaultmap'}}
|
|
|
|
for (i = 0; i < argc; ++i) foo();
|
2020-04-09 03:19:54 +08:00
|
|
|
#pragma omp target parallel for defaultmap( // omp5-error {{expected 'alloc', 'from', 'to', 'tofrom', 'firstprivate', 'none', 'default' in OpenMP clause 'defaultmap'}} expected-error {{expected ')'}} expected-note {{to match this '('}} omp45-error {{expected 'tofrom' in OpenMP clause 'defaultmap'}}
|
2016-02-03 23:46:42 +08:00
|
|
|
for (i = 0; i < argc; ++i) foo();
|
2020-04-09 03:19:54 +08:00
|
|
|
#pragma omp target parallel for defaultmap() // omp5-error {{expected 'alloc', 'from', 'to', 'tofrom', 'firstprivate', 'none', 'default' in OpenMP clause 'defaultmap'}} omp45-error {{expected 'tofrom' in OpenMP clause 'defaultmap'}}
|
2016-02-03 23:46:42 +08:00
|
|
|
for (i = 0; i < argc; ++i) foo();
|
2020-04-09 03:19:54 +08:00
|
|
|
#pragma omp target parallel for defaultmap(tofrom // expected-error {{expected ')'}} expected-note {{to match this '('}} omp45-warning {{missing ':' after defaultmap modifier - ignoring}} omp45-error {{expected 'scalar' in OpenMP clause 'defaultmap'}}
|
2016-02-03 23:46:42 +08:00
|
|
|
for (i = 0; i < argc; ++i) foo();
|
2019-11-16 02:02:06 +08:00
|
|
|
#pragma omp target parallel for defaultmap (tofrom: // expected-error {{expected ')'}} expected-note {{to match this '('}} omp5-error {{expected 'scalar', 'aggregate', 'pointer' in OpenMP clause 'defaultmap'}} omp45-error {{expected 'scalar' in OpenMP clause 'defaultmap'}}
|
2016-02-03 23:46:42 +08:00
|
|
|
for (i = 0; i < argc; ++i) foo();
|
2020-04-09 03:19:54 +08:00
|
|
|
#pragma omp target parallel for defaultmap(tofrom) // omp45-warning {{missing ':' after defaultmap modifier - ignoring}} omp45-error {{expected 'scalar' in OpenMP clause 'defaultmap'}}
|
2016-02-03 23:46:42 +08:00
|
|
|
for (i = 0; i < argc; ++i) foo();
|
2020-04-09 03:19:54 +08:00
|
|
|
#pragma omp target parallel for defaultmap(tofrom scalar) // omp45-warning {{missing ':' after defaultmap modifier - ignoring}} omp5-error {{expected ')'}} omp5-note {{to match this '('}}
|
2016-02-03 23:46:42 +08:00
|
|
|
for (i = 0; i < argc; ++i) foo();
|
2020-04-09 03:19:54 +08:00
|
|
|
#pragma omp target parallel for defaultmap(tofrom, // expected-error {{expected ')'}} omp45-warning {{missing ':' after defaultmap modifier - ignoring}} expected-note {{to match this '('}} omp45-error {{expected 'scalar' in OpenMP clause 'defaultmap'}}
|
2016-02-03 23:46:42 +08:00
|
|
|
for (i = 0; i < argc; ++i) foo();
|
2019-11-16 02:02:06 +08:00
|
|
|
#pragma omp target parallel for defaultmap (scalar: // omp5-error {{expected 'scalar', 'aggregate', 'pointer' in OpenMP clause 'defaultmap'}} expected-error {{expected ')'}} omp5-error {{expected 'alloc', 'from', 'to', 'tofrom', 'firstprivate', 'none', 'default' in OpenMP clause 'defaultmap'}} expected-note {{to match this '('}} omp45-error {{expected 'tofrom' in OpenMP clause 'defaultmap'}}
|
2016-02-03 23:46:42 +08:00
|
|
|
for (i = 0; i < argc; ++i) foo();
|
2020-04-09 03:19:54 +08:00
|
|
|
#pragma omp target parallel for defaultmap(tofrom, scalar // expected-error {{expected ')'}} omp45-warning {{missing ':' after defaultmap modifier - ignoring}} expected-note {{to match this '('}} omp45-error {{expected 'scalar' in OpenMP clause 'defaultmap'}}
|
2016-02-03 23:46:42 +08:00
|
|
|
for (i = 0; i < argc; ++i) foo();
|
|
|
|
|
|
|
|
return tmain<int, char, 1, 0>(argc, argv);
|
|
|
|
}
|