diff options
author | Joel E. Denny <jdenny.ornl@gmail.com> | 2019-01-04 22:12:13 +0000 |
---|---|---|
committer | Joel E. Denny <jdenny.ornl@gmail.com> | 2019-01-04 22:12:13 +0000 |
commit | 3bd81ff22212f694b92736739bfcaccd86da737c (patch) | |
tree | e64381d43542c0f656d2dd5dd86625b370a8328d | |
parent | 5b0be04e490e2b66c2abb51292e01112b6834ef4 (diff) | |
download | clang-3bd81ff22212f694b92736739bfcaccd86da737c.tar.gz |
[OpenMP] Refactor const restriction for linear
As discussed in D56113, this patch refactors the implementation of the
const restriction for linear to reuse a function introduced by D56113.
A side effect is that, if a variable has mutable members, this
diagnostic is now skipped, and the diagnostic for the variable not
being an integer or pointer is reported instead.
Reviewed By: ABataev
Differential Revision: https://reviews.llvm.org/D56299
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350441 91177308-0d34-0410-b5e6-96231b3b80d8
16 files changed, 35 insertions, 43 deletions
diff --git a/lib/Sema/SemaOpenMP.cpp b/lib/Sema/SemaOpenMP.cpp index 87d33c09e5..eac5f64e6e 100644 --- a/lib/Sema/SemaOpenMP.cpp +++ b/lib/Sema/SemaOpenMP.cpp @@ -11531,20 +11531,12 @@ bool Sema::CheckOpenMPLinearDecl(const ValueDecl *D, SourceLocation ELoc, } Type = Type.getNonReferenceType(); - // A list item must not be const-qualified. - if (Type.isConstant(Context)) { - Diag(ELoc, diag::err_omp_const_variable) - << getOpenMPClauseName(OMPC_linear); - if (D) { - bool IsDecl = - !VD || - VD->isThisDeclarationADefinition(Context) == VarDecl::DeclarationOnly; - Diag(D->getLocation(), - IsDecl ? diag::note_previous_decl : diag::note_defined_here) - << D; - } + // OpenMP 5.0 [2.19.3, List Item Privatization, Restrictions] + // A variable that is privatized must not have a const-qualified type + // unless it is of class type with a mutable member. This restriction does + // not apply to the firstprivate clause. + if (rejectConstNotMutableType(*this, D, Type, OMPC_linear, ELoc)) return true; - } // A list item must be of integral or pointer type. Type = Type.getUnqualifiedType().getCanonicalType(); diff --git a/test/OpenMP/distribute_parallel_for_simd_linear_messages.cpp b/test/OpenMP/distribute_parallel_for_simd_linear_messages.cpp index ad236ecda4..6fb5944d2c 100644 --- a/test/OpenMP/distribute_parallel_for_simd_linear_messages.cpp +++ b/test/OpenMP/distribute_parallel_for_simd_linear_messages.cpp @@ -189,7 +189,7 @@ template<class I, class C> int foomain(I argc, C **argv) { #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd linear (a, b:B::ib) // expected-error {{linear variable with incomplete type 'S1'}} expected-error {{const-qualified variable cannot be linear}} +#pragma omp distribute parallel for simd linear (a, b:B::ib) // expected-error {{linear variable with incomplete type 'S1'}} expected-error {{argument of a linear clause should be of integral or pointer type, not 'S2'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target @@ -294,7 +294,7 @@ int main(int argc, char **argv) { #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd linear (a, b) // expected-error {{linear variable with incomplete type 'S1'}} expected-error {{const-qualified variable cannot be linear}} expected-error {{incomplete type 'S1' where a complete type is required}} +#pragma omp distribute parallel for simd linear (a, b) // expected-error {{linear variable with incomplete type 'S1'}} expected-error {{argument of a linear clause should be of integral or pointer type, not 'S2'}} expected-error {{incomplete type 'S1' where a complete type is required}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target diff --git a/test/OpenMP/distribute_simd_linear_messages.cpp b/test/OpenMP/distribute_simd_linear_messages.cpp index f9af5dd94f..631b43a120 100644 --- a/test/OpenMP/distribute_simd_linear_messages.cpp +++ b/test/OpenMP/distribute_simd_linear_messages.cpp @@ -189,7 +189,7 @@ template<class I, class C> int foomain(I argc, C **argv) { #pragma omp target #pragma omp teams -#pragma omp distribute simd linear (a, b:B::ib) // expected-error {{linear variable with incomplete type 'S1'}} expected-error {{const-qualified variable cannot be linear}} +#pragma omp distribute simd linear (a, b:B::ib) // expected-error {{linear variable with incomplete type 'S1'}} expected-error {{argument of a linear clause should be of integral or pointer type, not 'S2'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target @@ -283,7 +283,7 @@ int main(int argc, char **argv) { #pragma omp target #pragma omp teams -#pragma omp distribute simd linear (a, b) // expected-error {{linear variable with incomplete type 'S1'}} expected-error {{const-qualified variable cannot be linear}} expected-warning {{Non-trivial type 'const S2' is mapped, only trivial types are guaranteed to be mapped correctly}} expected-error {{incomplete type 'S1' where a complete type is required}} +#pragma omp distribute simd linear (a, b) // expected-error {{linear variable with incomplete type 'S1'}} expected-error {{argument of a linear clause should be of integral or pointer type, not 'S2'}} expected-warning {{Non-trivial type 'const S2' is mapped, only trivial types are guaranteed to be mapped correctly}} expected-error {{incomplete type 'S1' where a complete type is required}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target diff --git a/test/OpenMP/for_linear_messages.cpp b/test/OpenMP/for_linear_messages.cpp index 622cd4a8a3..f35e5343c3 100644 --- a/test/OpenMP/for_linear_messages.cpp +++ b/test/OpenMP/for_linear_messages.cpp @@ -122,7 +122,7 @@ template<class I, class C> int foomain(I argc, C **argv) { #pragma omp for linear (S1) // expected-error {{'S1' does not refer to a value}} for (int k = 0; k < argc; ++k) ++k; // expected-error@+2 {{linear variable with incomplete type 'S1'}} - // expected-error@+1 {{const-qualified variable cannot be linear}} + // expected-error@+1 {{argument of a linear clause should be of integral or pointer type, not 'S2'}} #pragma omp for linear (a, b:B::ib) for (int k = 0; k < argc; ++k) ++k; #pragma omp for linear (argv[1]) // expected-error {{expected variable name}} @@ -188,7 +188,7 @@ int main(int argc, char **argv) { #pragma omp for linear (S1) // expected-error {{'S1' does not refer to a value}} for (int k = 0; k < argc; ++k) ++k; // expected-error@+2 {{linear variable with incomplete type 'S1'}} - // expected-error@+1 {{const-qualified variable cannot be linear}} + // expected-error@+1 {{argument of a linear clause should be of integral or pointer type, not 'S2'}} #pragma omp for linear(a, b) for (int k = 0; k < argc; ++k) ++k; #pragma omp for linear (argv[1]) // expected-error {{expected variable name}} diff --git a/test/OpenMP/for_simd_linear_messages.cpp b/test/OpenMP/for_simd_linear_messages.cpp index ff522e7b7e..a87b1ab115 100644 --- a/test/OpenMP/for_simd_linear_messages.cpp +++ b/test/OpenMP/for_simd_linear_messages.cpp @@ -122,7 +122,7 @@ template<class I, class C> int foomain(I argc, C **argv) { #pragma omp for simd linear (S1) // expected-error {{'S1' does not refer to a value}} for (int k = 0; k < argc; ++k) ++k; // expected-error@+2 {{linear variable with incomplete type 'S1'}} - // expected-error@+1 {{const-qualified variable cannot be linear}} + // expected-error@+1 {{argument of a linear clause should be of integral or pointer type, not 'S2'}} #pragma omp for simd linear (a, b:B::ib) for (int k = 0; k < argc; ++k) ++k; #pragma omp for simd linear (argv[1]) // expected-error {{expected variable name}} @@ -186,7 +186,7 @@ int main(int argc, char **argv) { #pragma omp for simd linear (S1) // expected-error {{'S1' does not refer to a value}} for (int k = 0; k < argc; ++k) ++k; // expected-error@+2 {{linear variable with incomplete type 'S1'}} - // expected-error@+1 {{const-qualified variable cannot be linear}} + // expected-error@+1 {{argument of a linear clause should be of integral or pointer type, not 'S2'}} #pragma omp for simd linear (a, b) for (int k = 0; k < argc; ++k) ++k; #pragma omp for simd linear (argv[1]) // expected-error {{expected variable name}} diff --git a/test/OpenMP/parallel_for_linear_messages.cpp b/test/OpenMP/parallel_for_linear_messages.cpp index 080add692c..6596814de6 100644 --- a/test/OpenMP/parallel_for_linear_messages.cpp +++ b/test/OpenMP/parallel_for_linear_messages.cpp @@ -146,7 +146,7 @@ int foomain(I argc, C **argv) { for (int k = 0; k < argc; ++k) ++k; // expected-error@+2 {{linear variable with incomplete type 'S1'}} -// expected-error@+1 {{const-qualified variable cannot be linear}} +// expected-error@+1 {{argument of a linear clause should be of integral or pointer type, not 'S2'}} #pragma omp parallel for linear(a, b : B::ib) for (int k = 0; k < argc; ++k) ++k; @@ -231,7 +231,7 @@ int main(int argc, char **argv) { for (int k = 0; k < argc; ++k) ++k; // expected-error@+2 {{linear variable with incomplete type 'S1'}} -// expected-error@+1 {{const-qualified variable cannot be linear}} +// expected-error@+1 {{argument of a linear clause should be of integral or pointer type, not 'S2'}} #pragma omp parallel for linear(a, b) for (int k = 0; k < argc; ++k) ++k; diff --git a/test/OpenMP/parallel_for_simd_linear_messages.cpp b/test/OpenMP/parallel_for_simd_linear_messages.cpp index a6bcf64806..792978e631 100644 --- a/test/OpenMP/parallel_for_simd_linear_messages.cpp +++ b/test/OpenMP/parallel_for_simd_linear_messages.cpp @@ -122,7 +122,7 @@ template<class I, class C> int foomain(I argc, C **argv) { #pragma omp parallel for simd linear (S1) // expected-error {{'S1' does not refer to a value}} for (int k = 0; k < argc; ++k) ++k; // expected-error@+2 {{linear variable with incomplete type 'S1'}} - // expected-error@+1 {{const-qualified variable cannot be linear}} + // expected-error@+1 {{argument of a linear clause should be of integral or pointer type, not 'S2'}} #pragma omp parallel for simd linear (a, b:B::ib) for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel for simd linear (argv[1]) // expected-error {{expected variable name}} @@ -186,7 +186,7 @@ int main(int argc, char **argv) { #pragma omp parallel for simd linear (S1) // expected-error {{'S1' does not refer to a value}} for (int k = 0; k < argc; ++k) ++k; // expected-error@+2 {{linear variable with incomplete type 'S1'}} - // expected-error@+1 {{const-qualified variable cannot be linear}} + // expected-error@+1 {{argument of a linear clause should be of integral or pointer type, not 'S2'}} #pragma omp parallel for simd linear (a, b) for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel for simd linear (argv[1]) // expected-error {{expected variable name}} diff --git a/test/OpenMP/simd_linear_messages.cpp b/test/OpenMP/simd_linear_messages.cpp index aad0d18d42..3a72ed26fc 100644 --- a/test/OpenMP/simd_linear_messages.cpp +++ b/test/OpenMP/simd_linear_messages.cpp @@ -132,7 +132,7 @@ template<class I, class C> int foomain(I argc, C **argv) { #pragma omp simd linear (S1) // expected-error {{'S1' does not refer to a value}} for (int k = 0; k < argc; ++k) ++k; // expected-error@+2 {{linear variable with incomplete type 'S1'}} - // expected-error@+1 {{const-qualified variable cannot be linear}} + // expected-error@+1 {{argument of a linear clause should be of integral or pointer type, not 'S2'}} #pragma omp simd linear (val(a, b):B::ib) for (int k = 0; k < argc; ++k) ++k; #pragma omp simd linear (argv[1]) // expected-error {{expected variable name}} @@ -221,7 +221,7 @@ int main(int argc, char **argv) { #pragma omp simd linear (S1) // expected-error {{'S1' does not refer to a value}} for (int k = 0; k < argc; ++k) ++k; // expected-error@+2 {{linear variable with incomplete type 'S1'}} - // expected-error@+1 {{const-qualified variable cannot be linear}} + // expected-error@+1 {{argument of a linear clause should be of integral or pointer type, not 'S2'}} #pragma omp simd linear(a, b) for (int k = 0; k < argc; ++k) ++k; #pragma omp simd linear (argv[1]) // expected-error {{expected variable name}} diff --git a/test/OpenMP/target_parallel_for_linear_messages.cpp b/test/OpenMP/target_parallel_for_linear_messages.cpp index b7224b538f..79890c414a 100644 --- a/test/OpenMP/target_parallel_for_linear_messages.cpp +++ b/test/OpenMP/target_parallel_for_linear_messages.cpp @@ -146,7 +146,7 @@ int foomain(I argc, C **argv) { for (int k = 0; k < argc; ++k) ++k; // expected-error@+2 {{linear variable with incomplete type 'S1'}} -// expected-error@+1 {{const-qualified variable cannot be linear}} +// expected-error@+1 {{argument of a linear clause should be of integral or pointer type, not 'S2'}} #pragma omp target parallel for linear(a, b : B::ib) for (int k = 0; k < argc; ++k) ++k; @@ -231,7 +231,7 @@ int main(int argc, char **argv) { for (int k = 0; k < argc; ++k) ++k; // expected-error@+2 {{linear variable with incomplete type 'S1'}} -// expected-error@+1 {{const-qualified variable cannot be linear}} +// expected-error@+1 {{argument of a linear clause should be of integral or pointer type, not 'S2'}} #pragma omp target parallel for linear(a, b) for (int k = 0; k < argc; ++k) ++k; diff --git a/test/OpenMP/target_parallel_for_simd_linear_messages.cpp b/test/OpenMP/target_parallel_for_simd_linear_messages.cpp index 40fd052df2..166cd2bc0b 100644 --- a/test/OpenMP/target_parallel_for_simd_linear_messages.cpp +++ b/test/OpenMP/target_parallel_for_simd_linear_messages.cpp @@ -146,7 +146,7 @@ int foomain(I argc, C **argv) { for (int k = 0; k < argc; ++k) ++k; // expected-error@+2 {{linear variable with incomplete type 'S1'}} -// expected-error@+1 {{const-qualified variable cannot be linear}} +// expected-error@+1 {{argument of a linear clause should be of integral or pointer type, not 'S2'}} #pragma omp target parallel for simd linear(a, b : B::ib) for (int k = 0; k < argc; ++k) ++k; @@ -231,7 +231,7 @@ int main(int argc, char **argv) { for (int k = 0; k < argc; ++k) ++k; // expected-error@+2 {{linear variable with incomplete type 'S1'}} -// expected-error@+1 {{const-qualified variable cannot be linear}} +// expected-error@+1 {{argument of a linear clause should be of integral or pointer type, not 'S2'}} #pragma omp target parallel for simd linear(a, b) for (int k = 0; k < argc; ++k) ++k; diff --git a/test/OpenMP/target_simd_linear_messages.cpp b/test/OpenMP/target_simd_linear_messages.cpp index 6a094b8651..d19409f280 100644 --- a/test/OpenMP/target_simd_linear_messages.cpp +++ b/test/OpenMP/target_simd_linear_messages.cpp @@ -146,7 +146,7 @@ int foomain(I argc, C **argv) { for (int k = 0; k < argc; ++k) ++k; // expected-error@+2 {{linear variable with incomplete type 'S1'}} -// expected-error@+1 {{const-qualified variable cannot be linear}} +// expected-error@+1 {{argument of a linear clause should be of integral or pointer type, not 'S2'}} #pragma omp target simd linear(a, b : B::ib) for (int k = 0; k < argc; ++k) ++k; @@ -231,7 +231,7 @@ int main(int argc, char **argv) { for (int k = 0; k < argc; ++k) ++k; // expected-error@+2 {{linear variable with incomplete type 'S1'}} -// expected-error@+1 {{const-qualified variable cannot be linear}} +// expected-error@+1 {{argument of a linear clause should be of integral or pointer type, not 'S2'}} #pragma omp target simd linear(a, b) for (int k = 0; k < argc; ++k) ++k; diff --git a/test/OpenMP/target_teams_distribute_parallel_for_simd_linear_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_simd_linear_messages.cpp index 3013480d6e..372a976087 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_simd_linear_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_simd_linear_messages.cpp @@ -148,7 +148,7 @@ template<class I, class C> int foomain(I argc, C **argv) { #pragma omp target teams distribute parallel for simd linear (S1) // expected-error {{'S1' does not refer to a value}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp target teams distribute parallel for simd linear (a, b:B::ib) // expected-error {{linear variable with incomplete type 'S1'}} expected-error {{const-qualified variable cannot be linear}} +#pragma omp target teams distribute parallel for simd linear (a, b:B::ib) // expected-error {{linear variable with incomplete type 'S1'}} expected-error {{argument of a linear clause should be of integral or pointer type, not 'S2'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target teams distribute parallel for simd linear (argv[1]) // expected-error {{expected variable name}} @@ -216,7 +216,7 @@ int main(int argc, char **argv) { for (int k = 0; k < argc; ++k) ++k; -#pragma omp target teams distribute parallel for simd linear (a, b) // expected-error {{linear variable with incomplete type 'S1'}} expected-error {{const-qualified variable cannot be linear}} +#pragma omp target teams distribute parallel for simd linear (a, b) // expected-error {{linear variable with incomplete type 'S1'}} expected-error {{argument of a linear clause should be of integral or pointer type, not 'S2'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target teams distribute parallel for simd linear (argv[1]) // expected-error {{expected variable name}} diff --git a/test/OpenMP/target_teams_distribute_simd_linear_messages.cpp b/test/OpenMP/target_teams_distribute_simd_linear_messages.cpp index 5bcd77da9e..c353242bc1 100644 --- a/test/OpenMP/target_teams_distribute_simd_linear_messages.cpp +++ b/test/OpenMP/target_teams_distribute_simd_linear_messages.cpp @@ -148,7 +148,7 @@ template<class I, class C> int foomain(I argc, C **argv) { #pragma omp target teams distribute simd linear (S1) // expected-error {{'S1' does not refer to a value}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp target teams distribute simd linear (a, b:B::ib) // expected-error {{linear variable with incomplete type 'S1'}} expected-error {{const-qualified variable cannot be linear}} +#pragma omp target teams distribute simd linear (a, b:B::ib) // expected-error {{linear variable with incomplete type 'S1'}} expected-error {{argument of a linear clause should be of integral or pointer type, not 'S2'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target teams distribute simd linear (argv[1]) // expected-error {{expected variable name}} @@ -216,7 +216,7 @@ int main(int argc, char **argv) { for (int k = 0; k < argc; ++k) ++k; -#pragma omp target teams distribute simd linear (a, b) // expected-error {{linear variable with incomplete type 'S1'}} expected-error {{const-qualified variable cannot be linear}} +#pragma omp target teams distribute simd linear (a, b) // expected-error {{linear variable with incomplete type 'S1'}} expected-error {{argument of a linear clause should be of integral or pointer type, not 'S2'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target teams distribute simd linear (argv[1]) // expected-error {{expected variable name}} diff --git a/test/OpenMP/taskloop_simd_linear_messages.cpp b/test/OpenMP/taskloop_simd_linear_messages.cpp index 2aea6a041f..645026c9fa 100644 --- a/test/OpenMP/taskloop_simd_linear_messages.cpp +++ b/test/OpenMP/taskloop_simd_linear_messages.cpp @@ -132,7 +132,7 @@ template<class I, class C> int foomain(I argc, C **argv) { #pragma omp taskloop simd linear (S1) // expected-error {{'S1' does not refer to a value}} for (int k = 0; k < argc; ++k) ++k; // expected-error@+2 {{linear variable with incomplete type 'S1'}} - // expected-error@+1 {{const-qualified variable cannot be linear}} + // expected-error@+1 {{argument of a linear clause should be of integral or pointer type, not 'S2'}} #pragma omp taskloop simd linear (val(a, b):B::ib) for (int k = 0; k < argc; ++k) ++k; #pragma omp taskloop simd linear (argv[1]) // expected-error {{expected variable name}} @@ -221,7 +221,7 @@ int main(int argc, char **argv) { #pragma omp taskloop simd linear (S1) // expected-error {{'S1' does not refer to a value}} for (int k = 0; k < argc; ++k) ++k; // expected-error@+2 {{linear variable with incomplete type 'S1'}} - // expected-error@+1 {{const-qualified variable cannot be linear}} + // expected-error@+1 {{argument of a linear clause should be of integral or pointer type, not 'S2'}} #pragma omp taskloop simd linear(a, b) for (int k = 0; k < argc; ++k) ++k; #pragma omp taskloop simd linear (argv[1]) // expected-error {{expected variable name}} diff --git a/test/OpenMP/teams_distribute_parallel_for_simd_linear_messages.cpp b/test/OpenMP/teams_distribute_parallel_for_simd_linear_messages.cpp index e60f2c9dbc..c6fb77b496 100644 --- a/test/OpenMP/teams_distribute_parallel_for_simd_linear_messages.cpp +++ b/test/OpenMP/teams_distribute_parallel_for_simd_linear_messages.cpp @@ -169,7 +169,7 @@ template<class I, class C> int foomain(I argc, C **argv) { for (int k = 0; k < argc; ++k) ++k; #pragma omp target -#pragma omp teams distribute parallel for simd linear (a, b:B::ib) // expected-error {{linear variable with incomplete type 'S1'}} expected-error {{const-qualified variable cannot be linear}} +#pragma omp teams distribute parallel for simd linear (a, b:B::ib) // expected-error {{linear variable with incomplete type 'S1'}} expected-error {{argument of a linear clause should be of integral or pointer type, not 'S2'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target @@ -250,7 +250,7 @@ int main(int argc, char **argv) { #pragma omp target -#pragma omp teams distribute parallel for simd linear (a, b) // expected-error {{linear variable with incomplete type 'S1'}} expected-error {{const-qualified variable cannot be linear}} +#pragma omp teams distribute parallel for simd linear (a, b) // expected-error {{linear variable with incomplete type 'S1'}} expected-error {{argument of a linear clause should be of integral or pointer type, not 'S2'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target diff --git a/test/OpenMP/teams_distribute_simd_linear_messages.cpp b/test/OpenMP/teams_distribute_simd_linear_messages.cpp index a3984b98da..8548e3dcc0 100644 --- a/test/OpenMP/teams_distribute_simd_linear_messages.cpp +++ b/test/OpenMP/teams_distribute_simd_linear_messages.cpp @@ -169,7 +169,7 @@ template<class I, class C> int foomain(I argc, C **argv) { for (int k = 0; k < argc; ++k) ++k; #pragma omp target -#pragma omp teams distribute simd linear (a, b:B::ib) // expected-error {{linear variable with incomplete type 'S1'}} expected-error {{const-qualified variable cannot be linear}} +#pragma omp teams distribute simd linear (a, b:B::ib) // expected-error {{linear variable with incomplete type 'S1'}} expected-error {{argument of a linear clause should be of integral or pointer type, not 'S2'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target @@ -250,7 +250,7 @@ int main(int argc, char **argv) { #pragma omp target -#pragma omp teams distribute simd linear (a, b) // expected-error {{linear variable with incomplete type 'S1'}} expected-error {{const-qualified variable cannot be linear}} +#pragma omp teams distribute simd linear (a, b) // expected-error {{linear variable with incomplete type 'S1'}} expected-error {{argument of a linear clause should be of integral or pointer type, not 'S2'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target |