From 5b0be04e490e2b66c2abb51292e01112b6834ef4 Mon Sep 17 00:00:00 2001 From: "Joel E. Denny" Date: Fri, 4 Jan 2019 22:11:56 +0000 Subject: [PATCH] [OpenMP] Refactor const restriction for reductions As discussed in D56113, this patch refactors the implementation of the const restriction for reductions to reuse a function introduced by D56113. A side effect is that diagnostics sometimes now say "variable" instead of "list item" when a list item is a variable. Reviewed By: ABataev Differential Revision: https://reviews.llvm.org/D56298 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350440 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Basic/DiagnosticSemaKinds.td | 4 +- lib/Sema/SemaOpenMP.cpp | 60 +++++++++---------- ...ribute_parallel_for_reduction_messages.cpp | 28 ++++----- ...e_parallel_for_simd_reduction_messages.cpp | 28 ++++----- .../distribute_simd_reduction_messages.cpp | 28 ++++----- test/OpenMP/for_reduction_messages.cpp | 28 ++++----- test/OpenMP/for_simd_reduction_messages.cpp | 28 ++++----- .../parallel_for_reduction_messages.cpp | 28 ++++----- .../parallel_for_simd_reduction_messages.cpp | 28 ++++----- test/OpenMP/parallel_reduction_messages.cpp | 28 ++++----- .../parallel_sections_reduction_messages.cpp | 28 ++++----- test/OpenMP/sections_reduction_messages.cpp | 28 ++++----- test/OpenMP/simd_reduction_messages.cpp | 28 ++++----- ...target_parallel_for_reduction_messages.cpp | 28 ++++----- ...t_parallel_for_simd_reduction_messages.cpp | 28 ++++----- .../target_parallel_reduction_messages.cpp | 28 ++++----- test/OpenMP/target_reduction_messages.cpp | 28 ++++----- .../OpenMP/target_simd_reduction_messages.cpp | 28 ++++----- ...ribute_parallel_for_reduction_messages.cpp | 28 ++++----- ...e_parallel_for_simd_reduction_messages.cpp | 28 ++++----- ...et_teams_distribute_reduction_messages.cpp | 28 ++++----- ...ams_distribute_simd_reduction_messages.cpp | 28 ++++----- .../target_teams_reduction_messages.cpp | 28 ++++----- test/OpenMP/task_in_reduction_message.cpp | 28 ++++----- .../taskgroup_task_reduction_messages.cpp | 28 ++++----- .../OpenMP/taskloop_in_reduction_messages.cpp | 28 ++++----- test/OpenMP/taskloop_reduction_messages.cpp | 28 ++++----- .../taskloop_simd_in_reduction_messages.cpp | 28 ++++----- .../taskloop_simd_reduction_messages.cpp | 28 ++++----- ...ribute_parallel_for_reduction_messages.cpp | 28 ++++----- ...e_parallel_for_simd_reduction_messages.cpp | 28 ++++----- .../teams_distribute_reduction_messages.cpp | 28 ++++----- ...ams_distribute_simd_reduction_messages.cpp | 28 ++++----- test/OpenMP/teams_reduction_messages.cpp | 28 ++++----- 34 files changed, 480 insertions(+), 480 deletions(-) diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index da0bb5d987..fb6cd24dba 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -8780,8 +8780,8 @@ def err_omp_const_variable : Error< "const-qualified variable cannot be %0">; def err_omp_const_not_mutable_variable : Error< "const-qualified variable without mutable fields cannot be %0">; -def err_omp_const_reduction_list_item : Error< - "const-qualified list item cannot be reduction">; +def err_omp_const_list_item : Error< + "const-qualified list item cannot be %0">; def err_omp_linear_incomplete_type : Error< "a linear variable with incomplete type %0">; def err_omp_linear_expected_int_or_ptr : Error< diff --git a/lib/Sema/SemaOpenMP.cpp b/lib/Sema/SemaOpenMP.cpp index 7b702250b8..87d33c09e5 100644 --- a/lib/Sema/SemaOpenMP.cpp +++ b/lib/Sema/SemaOpenMP.cpp @@ -1080,14 +1080,16 @@ bool DSAStackTy::isOpenMPLocal(VarDecl *D, iterator Iter) const { return false; } -static bool isConstNotMutableType(Sema &SemaRef, ValueDecl *D, +static bool isConstNotMutableType(Sema &SemaRef, QualType Type, + bool AcceptIfMutable = true, bool *IsClassType = nullptr) { ASTContext &Context = SemaRef.getASTContext(); - QualType Type = D->getType().getNonReferenceType().getCanonicalType(); + Type = Type.getNonReferenceType().getCanonicalType(); bool IsConstant = Type.isConstant(Context); Type = Context.getBaseElementType(Type); - const CXXRecordDecl *RD = - SemaRef.getLangOpts().CPlusPlus ? Type->getAsCXXRecordDecl() : nullptr; + const CXXRecordDecl *RD = AcceptIfMutable && SemaRef.getLangOpts().CPlusPlus + ? Type->getAsCXXRecordDecl() + : nullptr; if (const auto *CTSD = dyn_cast_or_null(RD)) if (const ClassTemplateDecl *CTD = CTSD->getSpecializedTemplate()) RD = CTD->getTemplatedDecl(); @@ -1097,21 +1099,27 @@ static bool isConstNotMutableType(Sema &SemaRef, ValueDecl *D, RD->hasDefinition() && RD->hasMutableFields()); } -static bool rejectConstNotMutableType(Sema &SemaRef, ValueDecl *D, - OpenMPClauseKind CKind, - SourceLocation ELoc) { +static bool rejectConstNotMutableType(Sema &SemaRef, const ValueDecl *D, + QualType Type, OpenMPClauseKind CKind, + SourceLocation ELoc, + bool AcceptIfMutable = true, + bool ListItemNotVar = false) { ASTContext &Context = SemaRef.getASTContext(); bool IsClassType; - if (isConstNotMutableType(SemaRef, D, &IsClassType)) { - SemaRef.Diag(ELoc, IsClassType ? diag::err_omp_const_not_mutable_variable - : diag::err_omp_const_variable) - << getOpenMPClauseName(CKind); - VarDecl *VD = dyn_cast(D); - bool IsDecl = !VD || VD->isThisDeclarationADefinition(Context) == - VarDecl::DeclarationOnly; - SemaRef.Diag(D->getLocation(), - IsDecl ? diag::note_previous_decl : diag::note_defined_here) - << D; + if (isConstNotMutableType(SemaRef, Type, AcceptIfMutable, &IsClassType)) { + unsigned Diag = ListItemNotVar + ? diag::err_omp_const_list_item + : IsClassType ? diag::err_omp_const_not_mutable_variable + : diag::err_omp_const_variable; + SemaRef.Diag(ELoc, Diag) << getOpenMPClauseName(CKind); + if (!ListItemNotVar && D) { + const VarDecl *VD = dyn_cast(D); + bool IsDecl = !VD || VD->isThisDeclarationADefinition(Context) == + VarDecl::DeclarationOnly; + SemaRef.Diag(D->getLocation(), + IsDecl ? diag::note_previous_decl : diag::note_defined_here) + << D; + } return true; } return false; @@ -1221,7 +1229,7 @@ const DSAStackTy::DSAVarData DSAStackTy::getTopDSA(ValueDecl *D, // in a Construct, C/C++, predetermined, p.6] // Variables with const qualified type having no mutable member are // shared. - if (isConstNotMutableType(SemaRef, D)) { + if (isConstNotMutableType(SemaRef, D->getType())) { // Variables with const-qualified type having no mutable member may be // listed in a firstprivate clause, even if they are static data members. DSAVarData DVarTemp = hasInnermostDSA( @@ -9830,7 +9838,7 @@ OMPClause *Sema::ActOnOpenMPPrivateClause(ArrayRef VarList, // OpenMP 3.1 [2.9.3.3, private clause, Restrictions] // A variable that appears in a private clause must not have a // const-qualified type unless it is of class type with a mutable member. - if (rejectConstNotMutableType(*this, D, OMPC_private, ELoc)) + if (rejectConstNotMutableType(*this, D, Type, OMPC_private, ELoc)) continue; // OpenMP [2.9.1.1, Data-sharing Attribute Rules for Variables Referenced @@ -10262,7 +10270,7 @@ OMPClause *Sema::ActOnOpenMPLastprivateClause(ArrayRef VarList, // OpenMP 3.1 [2.9.3.5, lastprivate clause, Restrictions] // A variable that appears in a lastprivate clause must not have a // const-qualified type unless it is of class type with a mutable member. - if (rejectConstNotMutableType(*this, D, OMPC_lastprivate, ELoc)) + if (rejectConstNotMutableType(*this, D, Type, OMPC_lastprivate, ELoc)) continue; OpenMPDirectiveKind CurrDir = DSAStack->getCurrentDirective(); @@ -10974,17 +10982,9 @@ static bool actOnOMPReductionKindClause( // OpenMP [2.14.3.6, reduction clause, Restrictions] // A list item that appears in a reduction clause must not be // const-qualified. - if (Type.getNonReferenceType().isConstant(Context)) { - S.Diag(ELoc, diag::err_omp_const_reduction_list_item) << ERange; - if (!ASE && !OASE) { - bool IsDecl = !VD || VD->isThisDeclarationADefinition(Context) == - VarDecl::DeclarationOnly; - S.Diag(D->getLocation(), - IsDecl ? diag::note_previous_decl : diag::note_defined_here) - << D; - } + if (rejectConstNotMutableType(S, D, Type, ClauseKind, ELoc, + /*AcceptIfMutable*/ false, ASE || OASE)) continue; - } OpenMPDirectiveKind CurrDir = Stack->getCurrentDirective(); // OpenMP [2.9.3.6, Restrictions, C/C++, p.4] diff --git a/test/OpenMP/distribute_parallel_for_reduction_messages.cpp b/test/OpenMP/distribute_parallel_for_reduction_messages.cpp index c3159c7c5f..e6be867f15 100644 --- a/test/OpenMP/distribute_parallel_for_reduction_messages.cpp +++ b/test/OpenMP/distribute_parallel_for_reduction_messages.cpp @@ -160,12 +160,12 @@ T tmain(T argc) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified list item cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} expected-warning 2 {{Non-trivial type 'S2' is mapped, only trivial types are guaranteed to be mapped correctly}} expected-warning 2 {{Non-trivial type 'S3' is mapped, only trivial types are guaranteed to be mapped correctly}} +#pragma omp distribute parallel for reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} expected-warning 2 {{Non-trivial type 'S2' is mapped, only trivial types are guaranteed to be mapped correctly}} expected-warning 2 {{Non-trivial type 'S3' is mapped, only trivial types are guaranteed to be mapped correctly}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified list item cannot be reduction}} +#pragma omp distribute parallel for reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target @@ -175,17 +175,17 @@ T tmain(T argc) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp distribute parallel for reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp distribute parallel for reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} expected-error {{const-qualified list item cannot be reduction}} +#pragma omp distribute parallel for reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target @@ -200,7 +200,7 @@ T tmain(T argc) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp distribute parallel for reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target @@ -231,7 +231,7 @@ T tmain(T argc) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for reduction(+ : r) // expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp distribute parallel for reduction(+ : r) // expected-error 2 {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel shared(i) @@ -344,12 +344,12 @@ int main(int argc, char **argv) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified list item cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} expected-error {{incomplete type 'S1' where a complete type is required}} expected-warning {{Non-trivial type 'S2' is mapped, only trivial types are guaranteed to be mapped correctly}} expected-warning {{Non-trivial type 'S3' is mapped, only trivial types are guaranteed to be mapped correctly}} +#pragma omp distribute parallel for reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} expected-error {{incomplete type 'S1' where a complete type is required}} expected-warning {{Non-trivial type 'S2' is mapped, only trivial types are guaranteed to be mapped correctly}} expected-warning {{Non-trivial type 'S3' is mapped, only trivial types are guaranteed to be mapped correctly}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified list item cannot be reduction}} expected-error {{incomplete type 'S1' where a complete type is required}} expected-warning {{Non-trivial type 'S2' is mapped, only trivial types are guaranteed to be mapped correctly}} expected-warning {{Non-trivial type 'S3' is mapped, only trivial types are guaranteed to be mapped correctly}} +#pragma omp distribute parallel for reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{incomplete type 'S1' where a complete type is required}} expected-warning {{Non-trivial type 'S2' is mapped, only trivial types are guaranteed to be mapped correctly}} expected-warning {{Non-trivial type 'S3' is mapped, only trivial types are guaranteed to be mapped correctly}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target @@ -359,17 +359,17 @@ int main(int argc, char **argv) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} expected-warning {{Non-trivial type 'const S2 [5]' is mapped, only trivial types are guaranteed to be mapped correctl}} +#pragma omp distribute parallel for reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} expected-warning {{Non-trivial type 'const S2 [5]' is mapped, only trivial types are guaranteed to be mapped correctl}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} expected-warning {{Non-trivial type 'const S3 [5]' is mapped, only trivial types are guaranteed to be mapped correctly}} +#pragma omp distribute parallel for reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} expected-warning {{Non-trivial type 'const S3 [5]' is mapped, only trivial types are guaranteed to be mapped correctly}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp distribute parallel for reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target @@ -384,7 +384,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp distribute parallel for reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target @@ -420,7 +420,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for reduction(+ : r) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp distribute parallel for reduction(+ : r) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel shared(i) diff --git a/test/OpenMP/distribute_parallel_for_simd_reduction_messages.cpp b/test/OpenMP/distribute_parallel_for_simd_reduction_messages.cpp index bcccf0bfdb..046cce59dd 100644 --- a/test/OpenMP/distribute_parallel_for_simd_reduction_messages.cpp +++ b/test/OpenMP/distribute_parallel_for_simd_reduction_messages.cpp @@ -160,12 +160,12 @@ T tmain(T argc) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified list item cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp distribute parallel for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified list item cannot be reduction}} +#pragma omp distribute parallel for simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target @@ -175,17 +175,17 @@ T tmain(T argc) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp distribute parallel for simd reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp distribute parallel for simd reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} expected-error {{const-qualified list item cannot be reduction}} +#pragma omp distribute parallel for simd reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target @@ -200,7 +200,7 @@ T tmain(T argc) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp distribute parallel for simd reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target @@ -231,7 +231,7 @@ T tmain(T argc) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd reduction(+ : r) // expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp distribute parallel for simd reduction(+ : r) // expected-error 2 {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel shared(i) @@ -344,12 +344,12 @@ int main(int argc, char **argv) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified list item cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} expected-error {{incomplete type 'S1' where a complete type is required}} +#pragma omp distribute parallel for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} expected-error {{incomplete type 'S1' where a complete type is required}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified list item cannot be reduction}} expected-error {{incomplete type 'S1' where a complete type is required}} +#pragma omp distribute parallel for simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{incomplete type 'S1' where a complete type is required}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target @@ -359,17 +359,17 @@ int main(int argc, char **argv) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp distribute parallel for simd reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp distribute parallel for simd reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp distribute parallel for simd reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target @@ -384,7 +384,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp distribute parallel for simd reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target @@ -420,7 +420,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd reduction(+ : r) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp distribute parallel for simd reduction(+ : r) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel shared(i) diff --git a/test/OpenMP/distribute_simd_reduction_messages.cpp b/test/OpenMP/distribute_simd_reduction_messages.cpp index 56f43a3b6d..f960b18319 100644 --- a/test/OpenMP/distribute_simd_reduction_messages.cpp +++ b/test/OpenMP/distribute_simd_reduction_messages.cpp @@ -160,12 +160,12 @@ T tmain(T argc) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified list item cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} expected-warning 2 {{Non-trivial type 'S2' is mapped, only trivial types are guaranteed to be mapped correctly}} expected-warning 2 {{Non-trivial type 'S3' is mapped, only trivial types are guaranteed to be mapped correctly}} +#pragma omp distribute simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} expected-warning 2 {{Non-trivial type 'S2' is mapped, only trivial types are guaranteed to be mapped correctly}} expected-warning 2 {{Non-trivial type 'S3' is mapped, only trivial types are guaranteed to be mapped correctly}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified list item cannot be reduction}} +#pragma omp distribute simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target @@ -175,17 +175,17 @@ T tmain(T argc) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute simd reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp distribute simd reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute simd reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp distribute simd reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute simd reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} expected-error {{const-qualified list item cannot be reduction}} +#pragma omp distribute simd reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target @@ -200,7 +200,7 @@ T tmain(T argc) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute simd reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp distribute simd reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target @@ -231,7 +231,7 @@ T tmain(T argc) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute simd reduction(+ : r) // expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp distribute simd reduction(+ : r) // expected-error 2 {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel shared(i) @@ -344,12 +344,12 @@ int main(int argc, char **argv) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified list item cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} expected-warning {{Non-trivial type 'S2' is mapped, only trivial types are guaranteed to be mapped correctly}} expected-warning {{Non-trivial type 'S3' 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 reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} expected-warning {{Non-trivial type 'S2' is mapped, only trivial types are guaranteed to be mapped correctly}} expected-warning {{Non-trivial type 'S3' is mapped, only trivial types are guaranteed to be mapped correctly}} expected-error {{incomplete type 'S1' where a complete type is required}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified list item cannot be reduction}} expected-warning {{Non-trivial type 'S2' is mapped, only trivial types are guaranteed to be mapped correctly}} expected-warning {{Non-trivial type 'S3' 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 reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-warning {{Non-trivial type 'S2' is mapped, only trivial types are guaranteed to be mapped correctly}} expected-warning {{Non-trivial type 'S3' is mapped, only trivial types are guaranteed to be mapped correctly}} expected-error {{incomplete type 'S1' where a complete type is required}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target @@ -359,17 +359,17 @@ int main(int argc, char **argv) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute simd reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} expected-warning {{Non-trivial type 'const S2 [5]' is mapped, only trivial types are guaranteed to be mapped correctly}} +#pragma omp distribute simd reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} expected-warning {{Non-trivial type 'const S2 [5]' is mapped, only trivial types are guaranteed to be mapped correctly}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute simd reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} expected-warning {{Non-trivial type 'const S3 [5]' is mapped, only trivial types are guaranteed to be mapped correctly}} +#pragma omp distribute simd reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} expected-warning {{Non-trivial type 'const S3 [5]' is mapped, only trivial types are guaranteed to be mapped correctly}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute simd reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp distribute simd reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target @@ -384,7 +384,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute simd reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp distribute simd reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target @@ -426,7 +426,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute simd reduction(+ : r) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp distribute simd reduction(+ : r) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel shared(i) diff --git a/test/OpenMP/for_reduction_messages.cpp b/test/OpenMP/for_reduction_messages.cpp index 520097de66..f575ee463d 100644 --- a/test/OpenMP/for_reduction_messages.cpp +++ b/test/OpenMP/for_reduction_messages.cpp @@ -146,11 +146,11 @@ T tmain(T argc) { for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel -#pragma omp for reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified list item cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp for reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel -#pragma omp for reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified list item cannot be reduction}} +#pragma omp for reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel @@ -158,15 +158,15 @@ T tmain(T argc) { for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel -#pragma omp for reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp for reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel -#pragma omp for reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp for reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel -#pragma omp for reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} expected-error {{const-qualified list item cannot be reduction}} +#pragma omp for reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel @@ -178,7 +178,7 @@ T tmain(T argc) { for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel -#pragma omp for reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp for reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel @@ -202,7 +202,7 @@ T tmain(T argc) { for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel -#pragma omp for reduction(+ : r) // expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp for reduction(+ : r) // expected-error 2 {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel shared(i) @@ -303,11 +303,11 @@ int main(int argc, char **argv) { for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel -#pragma omp for reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified list item cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} +#pragma omp for reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel -#pragma omp for reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp for reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel @@ -315,15 +315,15 @@ int main(int argc, char **argv) { for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel -#pragma omp for reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp for reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel -#pragma omp for reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp for reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel -#pragma omp for reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp for reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel @@ -335,7 +335,7 @@ int main(int argc, char **argv) { for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel -#pragma omp for reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp for reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel @@ -367,7 +367,7 @@ int main(int argc, char **argv) { for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel -#pragma omp for reduction(+ : r) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp for reduction(+ : r) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel shared(i) diff --git a/test/OpenMP/for_simd_reduction_messages.cpp b/test/OpenMP/for_simd_reduction_messages.cpp index 1f5578e611..12368efccf 100644 --- a/test/OpenMP/for_simd_reduction_messages.cpp +++ b/test/OpenMP/for_simd_reduction_messages.cpp @@ -145,11 +145,11 @@ T tmain(T argc) { for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel -#pragma omp for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified list item cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel -#pragma omp for simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified list item cannot be reduction}} +#pragma omp for simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel @@ -157,15 +157,15 @@ T tmain(T argc) { for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel -#pragma omp for simd reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp for simd reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel -#pragma omp for simd reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp for simd reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel -#pragma omp for simd reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} expected-error {{const-qualified list item cannot be reduction}} +#pragma omp for simd reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel @@ -177,7 +177,7 @@ T tmain(T argc) { for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel -#pragma omp for simd reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp for simd reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel @@ -201,7 +201,7 @@ T tmain(T argc) { for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel -#pragma omp for simd reduction(+ : r) // expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp for simd reduction(+ : r) // expected-error 2 {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel shared(i) @@ -294,11 +294,11 @@ int main(int argc, char **argv) { for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel -#pragma omp for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified list item cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} +#pragma omp for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel -#pragma omp for simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp for simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel @@ -306,15 +306,15 @@ int main(int argc, char **argv) { for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel -#pragma omp for simd reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp for simd reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel -#pragma omp for simd reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp for simd reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel -#pragma omp for simd reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp for simd reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel @@ -326,7 +326,7 @@ int main(int argc, char **argv) { for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel -#pragma omp for simd reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp for simd reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel @@ -354,7 +354,7 @@ int main(int argc, char **argv) { for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel -#pragma omp for simd reduction(+ : r) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp for simd reduction(+ : r) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel shared(i) diff --git a/test/OpenMP/parallel_for_reduction_messages.cpp b/test/OpenMP/parallel_for_reduction_messages.cpp index 5cfc2b9041..c44ee676d6 100644 --- a/test/OpenMP/parallel_for_reduction_messages.cpp +++ b/test/OpenMP/parallel_for_reduction_messages.cpp @@ -136,22 +136,22 @@ T tmain(T argc) { #pragma omp parallel for reduction(^ : T) // expected-error {{'T' does not refer to a value}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp parallel for reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified list item cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp parallel for reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp parallel for reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified list item cannot be reduction}} +#pragma omp parallel for reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel for reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp parallel for reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp parallel for reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp parallel for reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp parallel for reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp parallel for reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} expected-error {{const-qualified list item cannot be reduction}} +#pragma omp parallel for reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel for reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} @@ -160,7 +160,7 @@ T tmain(T argc) { #pragma omp parallel for reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp parallel for reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp parallel for reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel for reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}} @@ -179,7 +179,7 @@ T tmain(T argc) { #pragma omp parallel for reduction(+ : p), reduction(+ : p) // expected-error 2 {{variable can appear only once in OpenMP 'reduction' clause}} expected-note 2 {{previously referenced here}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp parallel for reduction(+ : r) // expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp parallel for reduction(+ : r) // expected-error 2 {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel shared(i) @@ -258,22 +258,22 @@ int main(int argc, char **argv) { #pragma omp parallel for reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp parallel for reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified list item cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} +#pragma omp parallel for reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp parallel for reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp parallel for reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel for reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp parallel for reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp parallel for reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp parallel for reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp parallel for reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp parallel for reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp parallel for reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel for reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} @@ -282,7 +282,7 @@ int main(int argc, char **argv) { #pragma omp parallel for reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp parallel for reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp parallel for reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel for reduction(& : e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{invalid operands to binary expression ('S4' and 'S4')}} expected-error {{calling a private constructor of class 'S5'}} expected-error {{invalid operands to binary expression ('S5' and 'S5')}} @@ -304,7 +304,7 @@ int main(int argc, char **argv) { #pragma omp parallel for reduction(+ : p), reduction(+ : p) // expected-error {{variable can appear only once in OpenMP 'reduction' clause}} expected-note {{previously referenced here}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp parallel for reduction(+ : r) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp parallel for reduction(+ : r) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel shared(i) diff --git a/test/OpenMP/parallel_for_simd_reduction_messages.cpp b/test/OpenMP/parallel_for_simd_reduction_messages.cpp index 32222ac5a5..5be42461f0 100644 --- a/test/OpenMP/parallel_for_simd_reduction_messages.cpp +++ b/test/OpenMP/parallel_for_simd_reduction_messages.cpp @@ -130,22 +130,22 @@ T tmain(T argc) { #pragma omp parallel for simd reduction(^ : T) // expected-error {{'T' does not refer to a value}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp parallel for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified list item cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp parallel for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp parallel for simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified list item cannot be reduction}} +#pragma omp parallel for simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel for simd reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp parallel for simd reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp parallel for simd reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp parallel for simd reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp parallel for simd reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp parallel for simd reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} expected-error {{const-qualified list item cannot be reduction}} +#pragma omp parallel for simd reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel for simd reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} @@ -154,7 +154,7 @@ T tmain(T argc) { #pragma omp parallel for simd reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp parallel for simd reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp parallel for simd reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel for simd reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}} @@ -173,7 +173,7 @@ T tmain(T argc) { #pragma omp parallel for simd reduction(+ : p), reduction(+ : p) // expected-error 2 {{variable can appear only once in OpenMP 'reduction' clause}} expected-note 2 {{previously referenced here}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp parallel for simd reduction(+ : r) // expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp parallel for simd reduction(+ : r) // expected-error 2 {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel shared(i) @@ -252,22 +252,22 @@ int main(int argc, char **argv) { #pragma omp parallel for simd reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp parallel for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified list item cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} +#pragma omp parallel for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp parallel for simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp parallel for simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel for simd reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp parallel for simd reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp parallel for simd reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp parallel for simd reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp parallel for simd reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp parallel for simd reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp parallel for simd reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel for simd reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} @@ -276,7 +276,7 @@ int main(int argc, char **argv) { #pragma omp parallel for simd reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp parallel for simd reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp parallel for simd reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel for simd reduction(& : e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{invalid operands to binary expression ('S4' and 'S4')}} expected-error {{calling a private constructor of class 'S5'}} expected-error {{invalid operands to binary expression ('S5' and 'S5')}} @@ -298,7 +298,7 @@ int main(int argc, char **argv) { #pragma omp parallel for simd reduction(+ : p), reduction(+ : p) // expected-error {{variable can appear only once in OpenMP 'reduction' clause}} expected-note {{previously referenced here}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp parallel for simd reduction(+ : r) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp parallel for simd reduction(+ : r) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel shared(i) diff --git a/test/OpenMP/parallel_reduction_messages.cpp b/test/OpenMP/parallel_reduction_messages.cpp index b3619bb9ad..f520d4a0fa 100644 --- a/test/OpenMP/parallel_reduction_messages.cpp +++ b/test/OpenMP/parallel_reduction_messages.cpp @@ -116,23 +116,23 @@ T tmain(T argc) { foo(); #pragma omp parallel reduction(^ : T) // expected-error {{'T' does not refer to a value}} foo(); -#pragma omp parallel reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified list item cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp parallel reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} foo(); -#pragma omp parallel reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified list item cannot be reduction}} +#pragma omp parallel reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} foo(); #pragma omp parallel reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} foo(); -#pragma omp parallel reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp parallel reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} foo(); -#pragma omp parallel reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp parallel reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} foo(); -#pragma omp parallel reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} expected-error {{const-qualified list item cannot be reduction}} +#pragma omp parallel reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} expected-error {{const-qualified variable cannot be reduction}} foo(); #pragma omp parallel reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} foo(); #pragma omp parallel reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} foo(); -#pragma omp parallel reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp parallel reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} foo(); #pragma omp parallel reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}} foo(); @@ -145,7 +145,7 @@ T tmain(T argc) { foo(); #pragma omp parallel reduction(+ : p), reduction(+ : p) // expected-error 2 {{variable can appear only once in OpenMP 'reduction' clause}} expected-note 2 {{previously referenced here}} foo(); -#pragma omp parallel reduction(+ : r) // expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp parallel reduction(+ : r) // expected-error 2 {{const-qualified variable cannot be reduction}} foo(); #pragma omp parallel shared(i) #pragma omp parallel reduction(min : i) @@ -211,23 +211,23 @@ int main(int argc, char **argv) { foo(); #pragma omp parallel reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} foo(); -#pragma omp parallel reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified list item cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} +#pragma omp parallel reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} foo(); -#pragma omp parallel reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp parallel reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}} foo(); #pragma omp parallel reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} foo(); -#pragma omp parallel reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp parallel reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} foo(); -#pragma omp parallel reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp parallel reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} foo(); -#pragma omp parallel reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp parallel reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} foo(); #pragma omp parallel reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} foo(); #pragma omp parallel reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} foo(); -#pragma omp parallel reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp parallel reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} foo(); #pragma omp parallel reduction(& : e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{nvalid operands to binary expression ('S4' and 'S4')}} expected-error {{calling a private constructor of class 'S5'}} expected-error {{invalid operands to binary expression ('S5' and 'S5')}} foo(); @@ -242,7 +242,7 @@ int main(int argc, char **argv) { foo(); #pragma omp parallel reduction(+ : p), reduction(+ : p) // expected-error {{variable can appear only once in OpenMP 'reduction' clause}} expected-note {{previously referenced here}} foo(); -#pragma omp parallel reduction(+ : r) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp parallel reduction(+ : r) // expected-error {{const-qualified variable cannot be reduction}} foo(); #pragma omp parallel shared(i) #pragma omp parallel reduction(min : i) diff --git a/test/OpenMP/parallel_sections_reduction_messages.cpp b/test/OpenMP/parallel_sections_reduction_messages.cpp index bbd3737de5..ae8384adf0 100644 --- a/test/OpenMP/parallel_sections_reduction_messages.cpp +++ b/test/OpenMP/parallel_sections_reduction_messages.cpp @@ -144,11 +144,11 @@ T tmain(T argc) { { foo(); } -#pragma omp parallel sections reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified list item cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp parallel sections reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} { foo(); } -#pragma omp parallel sections reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified list item cannot be reduction}} +#pragma omp parallel sections reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} { foo(); } @@ -156,15 +156,15 @@ T tmain(T argc) { { foo(); } -#pragma omp parallel sections reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp parallel sections reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} { foo(); } -#pragma omp parallel sections reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp parallel sections reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} { foo(); } -#pragma omp parallel sections reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} expected-error {{const-qualified list item cannot be reduction}} +#pragma omp parallel sections reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} expected-error {{const-qualified variable cannot be reduction}} { foo(); } @@ -176,7 +176,7 @@ T tmain(T argc) { { foo(); } -#pragma omp parallel sections reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp parallel sections reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} { foo(); } @@ -201,7 +201,7 @@ T tmain(T argc) { { foo(); } -#pragma omp parallel sections reduction(+ : r) // expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp parallel sections reduction(+ : r) // expected-error 2 {{const-qualified variable cannot be reduction}} { foo(); } @@ -297,11 +297,11 @@ int main(int argc, char **argv) { { foo(); } -#pragma omp parallel sections reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified list item cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} +#pragma omp parallel sections reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} { foo(); } -#pragma omp parallel sections reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp parallel sections reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}} { foo(); } @@ -309,15 +309,15 @@ int main(int argc, char **argv) { { foo(); } -#pragma omp parallel sections reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp parallel sections reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} { foo(); } -#pragma omp parallel sections reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp parallel sections reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} { foo(); } -#pragma omp parallel sections reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp parallel sections reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} { foo(); } @@ -329,7 +329,7 @@ int main(int argc, char **argv) { { foo(); } -#pragma omp parallel sections reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp parallel sections reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} { foo(); } @@ -358,7 +358,7 @@ int main(int argc, char **argv) { { foo(); } -#pragma omp parallel sections reduction(+ : r) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp parallel sections reduction(+ : r) // expected-error {{const-qualified variable cannot be reduction}} { foo(); } diff --git a/test/OpenMP/sections_reduction_messages.cpp b/test/OpenMP/sections_reduction_messages.cpp index bf302cf7b3..72a48c9c43 100644 --- a/test/OpenMP/sections_reduction_messages.cpp +++ b/test/OpenMP/sections_reduction_messages.cpp @@ -159,12 +159,12 @@ T tmain(T argc) { foo(); } #pragma omp parallel -#pragma omp sections reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified list item cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp sections reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} { foo(); } #pragma omp parallel -#pragma omp sections reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified list item cannot be reduction}} +#pragma omp sections reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} { foo(); } @@ -174,17 +174,17 @@ T tmain(T argc) { foo(); } #pragma omp parallel -#pragma omp sections reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp sections reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} { foo(); } #pragma omp parallel -#pragma omp sections reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp sections reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} { foo(); } #pragma omp parallel -#pragma omp sections reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} expected-error {{const-qualified list item cannot be reduction}} +#pragma omp sections reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} expected-error {{const-qualified variable cannot be reduction}} { foo(); } @@ -199,7 +199,7 @@ T tmain(T argc) { foo(); } #pragma omp parallel -#pragma omp sections reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp sections reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} { foo(); } @@ -229,7 +229,7 @@ T tmain(T argc) { foo(); } #pragma omp parallel -#pragma omp sections reduction(+ : r) // expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp sections reduction(+ : r) // expected-error 2 {{const-qualified variable cannot be reduction}} { foo(); } @@ -339,12 +339,12 @@ int main(int argc, char **argv) { foo(); } #pragma omp parallel -#pragma omp sections reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified list item cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} +#pragma omp sections reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} { foo(); } #pragma omp parallel -#pragma omp sections reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp sections reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}} { foo(); } @@ -354,17 +354,17 @@ int main(int argc, char **argv) { foo(); } #pragma omp parallel -#pragma omp sections reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp sections reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} { foo(); } #pragma omp parallel -#pragma omp sections reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp sections reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} { foo(); } #pragma omp parallel -#pragma omp sections reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp sections reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} { foo(); } @@ -379,7 +379,7 @@ int main(int argc, char **argv) { foo(); } #pragma omp parallel -#pragma omp sections reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp sections reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} { foo(); } @@ -414,7 +414,7 @@ int main(int argc, char **argv) { foo(); } #pragma omp parallel -#pragma omp sections reduction(+ : r) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp sections reduction(+ : r) // expected-error {{const-qualified variable cannot be reduction}} { foo(); } diff --git a/test/OpenMP/simd_reduction_messages.cpp b/test/OpenMP/simd_reduction_messages.cpp index 135a3ca71f..1602aeb40f 100644 --- a/test/OpenMP/simd_reduction_messages.cpp +++ b/test/OpenMP/simd_reduction_messages.cpp @@ -130,22 +130,22 @@ T tmain(T argc) { #pragma omp simd reduction(^ : T) // expected-error {{'T' does not refer to a value}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified list item cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified list item cannot be reduction}} +#pragma omp simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp simd reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp simd reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp simd reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp simd reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp simd reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp simd reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} expected-error {{const-qualified list item cannot be reduction}} +#pragma omp simd reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp simd reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} @@ -154,7 +154,7 @@ T tmain(T argc) { #pragma omp simd reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp simd reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp simd reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp simd reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}} @@ -176,7 +176,7 @@ T tmain(T argc) { #pragma omp simd reduction(+ : p), reduction(+ : p) // expected-error 2 {{variable can appear only once in OpenMP 'reduction' clause}} expected-note 2 {{previously referenced here}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp simd reduction(+ : r) // expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp simd reduction(+ : r) // expected-error 2 {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel shared(i) @@ -255,22 +255,22 @@ int main(int argc, char **argv) { #pragma omp simd reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified list item cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} +#pragma omp simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp simd reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp simd reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp simd reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp simd reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp simd reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp simd reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp simd reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp simd reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} @@ -279,7 +279,7 @@ int main(int argc, char **argv) { #pragma omp simd reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp simd reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp simd reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp simd reduction(& : e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{invalid operands to binary expression ('S4' and 'S4')}} expected-error {{calling a private constructor of class 'S5'}} expected-error {{invalid operands to binary expression ('S5' and 'S5')}} @@ -301,7 +301,7 @@ int main(int argc, char **argv) { #pragma omp simd reduction(+ : p), reduction(+ : p) // expected-error {{variable can appear only once in OpenMP 'reduction' clause}} expected-note {{previously referenced here}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp simd reduction(+ : r) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp simd reduction(+ : r) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel shared(i) diff --git a/test/OpenMP/target_parallel_for_reduction_messages.cpp b/test/OpenMP/target_parallel_for_reduction_messages.cpp index 5cc40e9b99..7cb55129e2 100644 --- a/test/OpenMP/target_parallel_for_reduction_messages.cpp +++ b/test/OpenMP/target_parallel_for_reduction_messages.cpp @@ -130,22 +130,22 @@ T tmain(T argc) { #pragma omp target parallel for reduction(^ : T) // expected-error {{'T' does not refer to a value}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target parallel for reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified list item cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp target parallel for reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target parallel for reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified list item cannot be reduction}} +#pragma omp target parallel for reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target parallel for reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target parallel for reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target parallel for reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target parallel for reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target parallel for reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target parallel for reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target parallel for reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target parallel for reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} @@ -154,7 +154,7 @@ T tmain(T argc) { #pragma omp target parallel for reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target parallel for reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target parallel for reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target parallel for reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}} @@ -173,7 +173,7 @@ T tmain(T argc) { #pragma omp target parallel for reduction(+ : p), reduction(+ : p) // expected-error 2 {{variable can appear only once in OpenMP 'reduction' clause}} expected-note 2 {{previously referenced here}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target parallel for reduction(+ : r) // expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp target parallel for reduction(+ : r) // expected-error 2 {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel shared(i) @@ -252,22 +252,22 @@ int main(int argc, char **argv) { #pragma omp target parallel for reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target parallel for reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified list item cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} +#pragma omp target parallel for reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target parallel for reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp target parallel for reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target parallel for reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target parallel for reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target parallel for reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target parallel for reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target parallel for reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target parallel for reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target parallel for reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target parallel for reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} @@ -276,7 +276,7 @@ int main(int argc, char **argv) { #pragma omp target parallel for reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target parallel for reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target parallel for reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target parallel for reduction(& : e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{invalid operands to binary expression ('S4' and 'S4')}} expected-error {{calling a private constructor of class 'S5'}} expected-error {{invalid operands to binary expression ('S5' and 'S5')}} @@ -298,7 +298,7 @@ int main(int argc, char **argv) { #pragma omp target parallel for reduction(+ : p), reduction(+ : p) // expected-error {{variable can appear only once in OpenMP 'reduction' clause}} expected-note {{previously referenced here}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target parallel for reduction(+ : r) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target parallel for reduction(+ : r) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel shared(i) diff --git a/test/OpenMP/target_parallel_for_simd_reduction_messages.cpp b/test/OpenMP/target_parallel_for_simd_reduction_messages.cpp index 30aaf832d6..eb3d756dce 100644 --- a/test/OpenMP/target_parallel_for_simd_reduction_messages.cpp +++ b/test/OpenMP/target_parallel_for_simd_reduction_messages.cpp @@ -130,22 +130,22 @@ T tmain(T argc) { #pragma omp target parallel for simd reduction(^ : T) // expected-error {{'T' does not refer to a value}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target parallel for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified list item cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp target parallel for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target parallel for simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified list item cannot be reduction}} +#pragma omp target parallel for simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target parallel for simd reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target parallel for simd reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target parallel for simd reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target parallel for simd reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target parallel for simd reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target parallel for simd reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target parallel for simd reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target parallel for simd reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} @@ -154,7 +154,7 @@ T tmain(T argc) { #pragma omp target parallel for simd reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target parallel for simd reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target parallel for simd reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target parallel for simd reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}} @@ -173,7 +173,7 @@ T tmain(T argc) { #pragma omp target parallel for simd reduction(+ : p), reduction(+ : p) // expected-error 2 {{variable can appear only once in OpenMP 'reduction' clause}} expected-note 2 {{previously referenced here}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target parallel for simd reduction(+ : r) // expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp target parallel for simd reduction(+ : r) // expected-error 2 {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel shared(i) @@ -252,22 +252,22 @@ int main(int argc, char **argv) { #pragma omp target parallel for simd reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target parallel for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified list item cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} +#pragma omp target parallel for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target parallel for simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp target parallel for simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target parallel for simd reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target parallel for simd reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target parallel for simd reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target parallel for simd reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target parallel for simd reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target parallel for simd reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target parallel for simd reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target parallel for simd reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} @@ -276,7 +276,7 @@ int main(int argc, char **argv) { #pragma omp target parallel for simd reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target parallel for simd reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target parallel for simd reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target parallel for simd reduction(& : e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{invalid operands to binary expression ('S4' and 'S4')}} expected-error {{calling a private constructor of class 'S5'}} expected-error {{invalid operands to binary expression ('S5' and 'S5')}} @@ -298,7 +298,7 @@ int main(int argc, char **argv) { #pragma omp target parallel for simd reduction(+ : p), reduction(+ : p) // expected-error {{variable can appear only once in OpenMP 'reduction' clause}} expected-note {{previously referenced here}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target parallel for simd reduction(+ : r) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target parallel for simd reduction(+ : r) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel shared(i) diff --git a/test/OpenMP/target_parallel_reduction_messages.cpp b/test/OpenMP/target_parallel_reduction_messages.cpp index 6ea08848d5..63a00caf92 100644 --- a/test/OpenMP/target_parallel_reduction_messages.cpp +++ b/test/OpenMP/target_parallel_reduction_messages.cpp @@ -116,23 +116,23 @@ T tmain(T argc) { foo(); #pragma omp target parallel reduction(^ : T) // expected-error {{'T' does not refer to a value}} foo(); -#pragma omp target parallel reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified list item cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp target parallel reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} foo(); -#pragma omp target parallel reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified list item cannot be reduction}} +#pragma omp target parallel reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} foo(); #pragma omp target parallel reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} foo(); -#pragma omp target parallel reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target parallel reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} foo(); -#pragma omp target parallel reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target parallel reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} foo(); -#pragma omp target parallel reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target parallel reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} expected-error {{const-qualified variable cannot be reduction}} foo(); #pragma omp target parallel reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} foo(); #pragma omp target parallel reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} foo(); -#pragma omp target parallel reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target parallel reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} foo(); #pragma omp target parallel reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}} foo(); @@ -145,7 +145,7 @@ T tmain(T argc) { foo(); #pragma omp target parallel reduction(+ : p), reduction(+ : p) // expected-error 2 {{variable can appear only once in OpenMP 'reduction' clause}} expected-note 2 {{previously referenced here}} foo(); -#pragma omp target parallel reduction(+ : r) // expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp target parallel reduction(+ : r) // expected-error 2 {{const-qualified variable cannot be reduction}} foo(); #pragma omp target parallel shared(i) foo(); @@ -214,23 +214,23 @@ int main(int argc, char **argv) { foo(); #pragma omp target parallel reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} foo(); -#pragma omp target parallel reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified list item cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} +#pragma omp target parallel reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} foo(); -#pragma omp target parallel reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp target parallel reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}} foo(); #pragma omp target parallel reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} foo(); -#pragma omp target parallel reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target parallel reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} foo(); -#pragma omp target parallel reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target parallel reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} foo(); -#pragma omp target parallel reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target parallel reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} foo(); #pragma omp target parallel reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} foo(); #pragma omp target parallel reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} foo(); -#pragma omp target parallel reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target parallel reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} foo(); #pragma omp target parallel reduction(& : e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{nvalid operands to binary expression ('S4' and 'S4')}} expected-error {{calling a private constructor of class 'S5'}} expected-error {{invalid operands to binary expression ('S5' and 'S5')}} foo(); @@ -245,7 +245,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target parallel reduction(+ : p), reduction(+ : p) // expected-error {{variable can appear only once in OpenMP 'reduction' clause}} expected-note {{previously referenced here}} foo(); -#pragma omp target parallel reduction(+ : r) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target parallel reduction(+ : r) // expected-error {{const-qualified variable cannot be reduction}} foo(); #pragma omp target parallel shared(i) foo(); diff --git a/test/OpenMP/target_reduction_messages.cpp b/test/OpenMP/target_reduction_messages.cpp index ff936b8c19..29a12aba85 100644 --- a/test/OpenMP/target_reduction_messages.cpp +++ b/test/OpenMP/target_reduction_messages.cpp @@ -116,23 +116,23 @@ T tmain(T argc) { foo(); #pragma omp target reduction(^ : T) // expected-error {{'T' does not refer to a value}} foo(); -#pragma omp target reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified list item cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp target reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} foo(); -#pragma omp target reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified list item cannot be reduction}} +#pragma omp target reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} foo(); #pragma omp target reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} foo(); -#pragma omp target reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} foo(); -#pragma omp target reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} foo(); -#pragma omp target reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} expected-error {{const-qualified variable cannot be reduction}} foo(); #pragma omp target reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} foo(); #pragma omp target reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} foo(); -#pragma omp target reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} foo(); #pragma omp target reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}} foo(); @@ -145,7 +145,7 @@ T tmain(T argc) { foo(); #pragma omp target reduction(+ : p), reduction(+ : p) // expected-error 2 {{variable can appear only once in OpenMP 'reduction' clause}} expected-note 2 {{previously referenced here}} foo(); -#pragma omp target reduction(+ : r) // expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp target reduction(+ : r) // expected-error 2 {{const-qualified variable cannot be reduction}} foo(); #pragma omp parallel shared(i) #pragma omp target reduction(min : i) @@ -211,23 +211,23 @@ int main(int argc, char **argv) { foo(); #pragma omp target reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} foo(); -#pragma omp target reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified list item cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} +#pragma omp target reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} foo(); -#pragma omp target reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp target reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}} foo(); #pragma omp target reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} foo(); -#pragma omp target reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} foo(); -#pragma omp target reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} foo(); -#pragma omp target reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} foo(); #pragma omp target reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} foo(); #pragma omp target reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} foo(); -#pragma omp target reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} foo(); #pragma omp target reduction(& : e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{nvalid operands to binary expression ('S4' and 'S4')}} expected-error {{calling a private constructor of class 'S5'}} expected-error {{invalid operands to binary expression ('S5' and 'S5')}} foo(); @@ -242,7 +242,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target reduction(+ : p), reduction(+ : p) // expected-error {{variable can appear only once in OpenMP 'reduction' clause}} expected-note {{previously referenced here}} foo(); -#pragma omp target reduction(+ : r) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target reduction(+ : r) // expected-error {{const-qualified variable cannot be reduction}} foo(); #pragma omp parallel shared(i) #pragma omp target reduction(min : i) diff --git a/test/OpenMP/target_simd_reduction_messages.cpp b/test/OpenMP/target_simd_reduction_messages.cpp index 299c81315a..cf6c9f6295 100644 --- a/test/OpenMP/target_simd_reduction_messages.cpp +++ b/test/OpenMP/target_simd_reduction_messages.cpp @@ -130,22 +130,22 @@ T tmain(T argc) { #pragma omp target simd reduction(^ : T) // expected-error {{'T' does not refer to a value}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified list item cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp target simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified list item cannot be reduction}} +#pragma omp target simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target simd reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target simd reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target simd reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target simd reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target simd reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target simd reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target simd reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target simd reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} @@ -154,7 +154,7 @@ T tmain(T argc) { #pragma omp target simd reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target simd reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target simd reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target simd reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}} @@ -173,7 +173,7 @@ T tmain(T argc) { #pragma omp target simd reduction(+ : p), reduction(+ : p) // expected-error 2 {{variable can appear only once in OpenMP 'reduction' clause}} expected-note 2 {{previously referenced here}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target simd reduction(+ : r) // expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp target simd reduction(+ : r) // expected-error 2 {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel shared(i) @@ -252,22 +252,22 @@ int main(int argc, char **argv) { #pragma omp target simd reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified list item cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} +#pragma omp target simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp target simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target simd reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target simd reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target simd reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target simd reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target simd reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target simd reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target simd reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target simd reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} @@ -276,7 +276,7 @@ int main(int argc, char **argv) { #pragma omp target simd reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target simd reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target simd reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target simd reduction(& : e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{invalid operands to binary expression ('S4' and 'S4')}} expected-error {{calling a private constructor of class 'S5'}} expected-error {{invalid operands to binary expression ('S5' and 'S5')}} @@ -298,7 +298,7 @@ int main(int argc, char **argv) { #pragma omp target simd reduction(+ : p), reduction(+ : p) // expected-error {{variable can appear only once in OpenMP 'reduction' clause}} expected-note {{previously referenced here}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target simd reduction(+ : r) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target simd reduction(+ : r) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel shared(i) diff --git a/test/OpenMP/target_teams_distribute_parallel_for_reduction_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_reduction_messages.cpp index 53c41b6bb0..33a0e37b86 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_reduction_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_reduction_messages.cpp @@ -111,23 +111,23 @@ T tmain(T argc) { for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for reduction(^ : T) // expected-error {{'T' does not refer to a value}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute parallel for reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified list item cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp target teams distribute parallel for reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute parallel for reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified list item cannot be reduction}} +#pragma omp target teams distribute parallel for reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute parallel for reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target teams distribute parallel for reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute parallel for reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target teams distribute parallel for reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute parallel for reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target teams distribute parallel for reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute parallel for reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target teams distribute parallel for reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}} for (int j=0; j<100; j++) foo(); @@ -140,7 +140,7 @@ T tmain(T argc) { for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for reduction(+ : p), reduction(+ : p) // expected-error 2 {{variable can appear only once in OpenMP 'reduction' clause}} expected-note 2 {{previously referenced here}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute parallel for reduction(+ : r) // expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp target teams distribute parallel for reduction(+ : r) // expected-error 2 {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp parallel shared(i) #pragma omp parallel reduction(min : i) @@ -198,23 +198,23 @@ int main(int argc, char **argv) { for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute parallel for reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified list item cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} +#pragma omp target teams distribute parallel for reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute parallel for reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp target teams distribute parallel for reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute parallel for reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target teams distribute parallel for reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute parallel for reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target teams distribute parallel for reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute parallel for reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target teams distribute parallel for reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute parallel for reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target teams distribute parallel for reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for reduction(& : e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{invalid operands to binary expression ('S4' and 'S4')}} expected-error {{calling a private constructor of class 'S5'}} expected-error {{invalid operands to binary expression ('S5' and 'S5')}} for (int j=0; j<100; j++) foo(); @@ -229,7 +229,7 @@ int main(int argc, char **argv) { for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for reduction(+ : p), reduction(+ : p) // expected-error {{variable can appear only once in OpenMP 'reduction' clause}} expected-note {{previously referenced here}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute parallel for reduction(+ : r) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target teams distribute parallel for reduction(+ : r) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp parallel shared(i) #pragma omp parallel reduction(min : i) diff --git a/test/OpenMP/target_teams_distribute_parallel_for_simd_reduction_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_simd_reduction_messages.cpp index 8cd4acd878..d3d9c60091 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_simd_reduction_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_simd_reduction_messages.cpp @@ -111,23 +111,23 @@ T tmain(T argc) { for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for simd reduction(^ : T) // expected-error {{'T' does not refer to a value}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute parallel for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified list item cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp target teams distribute parallel for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute parallel for simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified list item cannot be reduction}} +#pragma omp target teams distribute parallel for simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for simd reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute parallel for simd reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target teams distribute parallel for simd reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute parallel for simd reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target teams distribute parallel for simd reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute parallel for simd reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target teams distribute parallel for simd reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for simd reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for simd reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute parallel for simd reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target teams distribute parallel for simd reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for simd reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}} for (int j=0; j<100; j++) foo(); @@ -140,7 +140,7 @@ T tmain(T argc) { for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for simd reduction(+ : p), reduction(+ : p) // expected-error 2 {{variable can appear only once in OpenMP 'reduction' clause}} expected-note 2 {{previously referenced here}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute parallel for simd reduction(+ : r) // expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp target teams distribute parallel for simd reduction(+ : r) // expected-error 2 {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp parallel shared(i) #pragma omp parallel reduction(min : i) @@ -198,23 +198,23 @@ int main(int argc, char **argv) { for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for simd reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute parallel for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified list item cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} +#pragma omp target teams distribute parallel for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute parallel for simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp target teams distribute parallel for simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for simd reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute parallel for simd reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target teams distribute parallel for simd reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute parallel for simd reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target teams distribute parallel for simd reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute parallel for simd reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target teams distribute parallel for simd reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for simd reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for simd reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute parallel for simd reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target teams distribute parallel for simd reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for simd reduction(& : e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{invalid operands to binary expression ('S4' and 'S4')}} expected-error {{calling a private constructor of class 'S5'}} expected-error {{invalid operands to binary expression ('S5' and 'S5')}} for (int j=0; j<100; j++) foo(); @@ -229,7 +229,7 @@ int main(int argc, char **argv) { for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for simd reduction(+ : p), reduction(+ : p) // expected-error {{variable can appear only once in OpenMP 'reduction' clause}} expected-note {{previously referenced here}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute parallel for simd reduction(+ : r) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target teams distribute parallel for simd reduction(+ : r) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp parallel shared(i) #pragma omp parallel reduction(min : i) diff --git a/test/OpenMP/target_teams_distribute_reduction_messages.cpp b/test/OpenMP/target_teams_distribute_reduction_messages.cpp index 38878fc74c..6a9e6782f6 100644 --- a/test/OpenMP/target_teams_distribute_reduction_messages.cpp +++ b/test/OpenMP/target_teams_distribute_reduction_messages.cpp @@ -116,23 +116,23 @@ T tmain(T argc) { for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute reduction(^ : T) // expected-error {{'T' does not refer to a value}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified list item cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp target teams distribute reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified list item cannot be reduction}} +#pragma omp target teams distribute reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target teams distribute reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target teams distribute reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target teams distribute reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target teams distribute reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}} for (int j=0; j<100; j++) foo(); @@ -145,7 +145,7 @@ T tmain(T argc) { for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute reduction(+ : p), reduction(+ : p) // expected-error 2 {{variable can appear only once in OpenMP 'reduction' clause}} expected-note 2 {{previously referenced here}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute reduction(+ : r) // expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp target teams distribute reduction(+ : r) // expected-error 2 {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp parallel shared(i) #pragma omp parallel reduction(min : i) @@ -203,23 +203,23 @@ int main(int argc, char **argv) { for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified list item cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} +#pragma omp target teams distribute reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp target teams distribute reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target teams distribute reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target teams distribute reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target teams distribute reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target teams distribute reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute reduction(& : e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{invalid operands to binary expression ('S4' and 'S4')}} expected-error {{calling a private constructor of class 'S5'}} expected-error {{invalid operands to binary expression ('S5' and 'S5')}} for (int j=0; j<100; j++) foo(); @@ -234,7 +234,7 @@ int main(int argc, char **argv) { for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute reduction(+ : p), reduction(+ : p) // expected-error {{variable can appear only once in OpenMP 'reduction' clause}} expected-note {{previously referenced here}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute reduction(+ : r) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target teams distribute reduction(+ : r) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp parallel shared(i) #pragma omp parallel reduction(min : i) diff --git a/test/OpenMP/target_teams_distribute_simd_reduction_messages.cpp b/test/OpenMP/target_teams_distribute_simd_reduction_messages.cpp index b77082b44a..1b4b3ed88c 100644 --- a/test/OpenMP/target_teams_distribute_simd_reduction_messages.cpp +++ b/test/OpenMP/target_teams_distribute_simd_reduction_messages.cpp @@ -111,23 +111,23 @@ T tmain(T argc) { for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute simd reduction(^ : T) // expected-error {{'T' does not refer to a value}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified list item cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp target teams distribute simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified list item cannot be reduction}} +#pragma omp target teams distribute simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute simd reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute simd reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target teams distribute simd reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute simd reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target teams distribute simd reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute simd reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target teams distribute simd reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute simd reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute simd reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute simd reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target teams distribute simd reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute simd reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}} for (int j=0; j<100; j++) foo(); @@ -140,7 +140,7 @@ T tmain(T argc) { for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute simd reduction(+ : p), reduction(+ : p) // expected-error 2 {{variable can appear only once in OpenMP 'reduction' clause}} expected-note 2 {{previously referenced here}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute simd reduction(+ : r) // expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp target teams distribute simd reduction(+ : r) // expected-error 2 {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp parallel shared(i) #pragma omp parallel reduction(min : i) @@ -198,23 +198,23 @@ int main(int argc, char **argv) { for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute simd reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified list item cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} +#pragma omp target teams distribute simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp target teams distribute simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute simd reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute simd reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target teams distribute simd reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute simd reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target teams distribute simd reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute simd reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target teams distribute simd reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute simd reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute simd reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute simd reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target teams distribute simd reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute simd reduction(& : e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{invalid operands to binary expression ('S4' and 'S4')}} expected-error {{calling a private constructor of class 'S5'}} expected-error {{invalid operands to binary expression ('S5' and 'S5')}} for (int j=0; j<100; j++) foo(); @@ -229,7 +229,7 @@ int main(int argc, char **argv) { for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute simd reduction(+ : p), reduction(+ : p) // expected-error {{variable can appear only once in OpenMP 'reduction' clause}} expected-note {{previously referenced here}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute simd reduction(+ : r) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target teams distribute simd reduction(+ : r) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp parallel shared(i) #pragma omp parallel reduction(min : i) diff --git a/test/OpenMP/target_teams_reduction_messages.cpp b/test/OpenMP/target_teams_reduction_messages.cpp index c62f2c5844..1c3eacfef4 100644 --- a/test/OpenMP/target_teams_reduction_messages.cpp +++ b/test/OpenMP/target_teams_reduction_messages.cpp @@ -116,23 +116,23 @@ T tmain(T argc) { foo(); #pragma omp target teams reduction(^ : T) // expected-error {{'T' does not refer to a value}} foo(); -#pragma omp target teams reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified list item cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp target teams reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} foo(); -#pragma omp target teams reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified list item cannot be reduction}} +#pragma omp target teams reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} foo(); #pragma omp target teams reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} foo(); -#pragma omp target teams reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target teams reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} foo(); -#pragma omp target teams reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target teams reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} foo(); -#pragma omp target teams reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target teams reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} expected-error {{const-qualified variable cannot be reduction}} foo(); #pragma omp target teams reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} foo(); #pragma omp target teams reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} foo(); -#pragma omp target teams reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target teams reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} foo(); #pragma omp target teams reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}} foo(); @@ -145,7 +145,7 @@ T tmain(T argc) { foo(); #pragma omp target teams reduction(+ : p), reduction(+ : p) // expected-error 2 {{variable can appear only once in OpenMP 'reduction' clause}} expected-note 2 {{previously referenced here}} foo(); -#pragma omp target teams reduction(+ : r) // expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp target teams reduction(+ : r) // expected-error 2 {{const-qualified variable cannot be reduction}} foo(); #pragma omp parallel shared(i) #pragma omp parallel reduction(min : i) @@ -213,23 +213,23 @@ int main(int argc, char **argv) { foo(); #pragma omp target teams reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} foo(); -#pragma omp target teams reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified list item cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} +#pragma omp target teams reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} foo(); -#pragma omp target teams reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp target teams reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}} foo(); #pragma omp target teams reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} foo(); -#pragma omp target teams reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target teams reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} foo(); -#pragma omp target teams reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target teams reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} foo(); -#pragma omp target teams reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target teams reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} foo(); #pragma omp target teams reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} foo(); #pragma omp target teams reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} foo(); -#pragma omp target teams reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target teams reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} foo(); #pragma omp target teams reduction(& : e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{invalid operands to binary expression ('S4' and 'S4')}} expected-error {{calling a private constructor of class 'S5'}} expected-error {{invalid operands to binary expression ('S5' and 'S5')}} foo(); @@ -244,7 +244,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target teams reduction(+ : p), reduction(+ : p) // expected-error {{variable can appear only once in OpenMP 'reduction' clause}} expected-note {{previously referenced here}} foo(); -#pragma omp target teams reduction(+ : r) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp target teams reduction(+ : r) // expected-error {{const-qualified variable cannot be reduction}} foo(); #pragma omp parallel shared(i) #pragma omp parallel reduction(min : i) diff --git a/test/OpenMP/task_in_reduction_message.cpp b/test/OpenMP/task_in_reduction_message.cpp index d99d2e42d7..e9bde31ec9 100644 --- a/test/OpenMP/task_in_reduction_message.cpp +++ b/test/OpenMP/task_in_reduction_message.cpp @@ -154,23 +154,23 @@ T tmain(T argc) { #pragma omp task in_reduction(^ : T) // expected-error {{'T' does not refer to a value}} foo(); #pragma omp taskgroup task_reduction(+:c) -#pragma omp task in_reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified list item cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} expected-error 2 {{in_reduction variable must appear in a task_reduction clause}} +#pragma omp task in_reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be in_reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} expected-error 2 {{in_reduction variable must appear in a task_reduction clause}} foo(); -#pragma omp task in_reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'in_reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified list item cannot be reduction}} +#pragma omp task in_reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'in_reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be in_reduction}} foo(); #pragma omp task in_reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} foo(); -#pragma omp task in_reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp task in_reduction(+ : ba) // expected-error {{const-qualified variable cannot be in_reduction}} foo(); -#pragma omp task in_reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp task in_reduction(* : ca) // expected-error {{const-qualified variable cannot be in_reduction}} foo(); -#pragma omp task in_reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} expected-error {{const-qualified list item cannot be reduction}} +#pragma omp task in_reduction(- : da) // expected-error {{const-qualified variable cannot be in_reduction}} expected-error {{const-qualified variable cannot be in_reduction}} foo(); #pragma omp task in_reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} expected-error {{in_reduction variable must appear in a task_reduction clause}} foo(); #pragma omp task in_reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} foo(); -#pragma omp task in_reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp task in_reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be in_reduction}} foo(); #pragma omp taskgroup task_reduction(+:k) #pragma omp task in_reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}} @@ -183,7 +183,7 @@ T tmain(T argc) { #pragma omp taskgroup task_reduction(+:p) #pragma omp task in_reduction(+ : p), in_reduction(+ : p) // expected-error 2 {{variable can appear only once in OpenMP 'in_reduction' clause}} expected-note 2 {{previously referenced here}} foo(); -#pragma omp task in_reduction(+ : r) // expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp task in_reduction(+ : r) // expected-error 2 {{const-qualified variable cannot be in_reduction}} foo(); #pragma omp parallel shared(i) #pragma omp parallel reduction(min : i) @@ -258,23 +258,23 @@ int main(int argc, char **argv) { #pragma omp task in_reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} foo(); #pragma omp taskgroup task_reduction(+:c) -#pragma omp task in_reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified list item cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} expected-error {{in_reduction variable must appear in a task_reduction clause}} +#pragma omp task in_reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be in_reduction}} expected-error {{'operator+' is a private member of 'S2'}} expected-error {{in_reduction variable must appear in a task_reduction clause}} foo(); -#pragma omp task in_reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'in_reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp task in_reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'in_reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be in_reduction}} foo(); #pragma omp task in_reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} foo(); -#pragma omp task in_reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp task in_reduction(+ : ba) // expected-error {{const-qualified variable cannot be in_reduction}} foo(); -#pragma omp task in_reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp task in_reduction(* : ca) // expected-error {{const-qualified variable cannot be in_reduction}} foo(); -#pragma omp task in_reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp task in_reduction(- : da) // expected-error {{const-qualified variable cannot be in_reduction}} foo(); #pragma omp task in_reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} foo(); #pragma omp task in_reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} foo(); -#pragma omp task in_reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp task in_reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be in_reduction}} foo(); #pragma omp task in_reduction(& : e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{nvalid operands to binary expression ('S4' and 'S4')}} expected-error {{calling a private constructor of class 'S5'}} expected-error {{invalid operands to binary expression ('S5' and 'S5')}} foo(); @@ -289,7 +289,7 @@ int main(int argc, char **argv) { #pragma omp taskgroup task_reduction(+:p) #pragma omp task in_reduction(+ : p), in_reduction(+ : p) // expected-error {{variable can appear only once in OpenMP 'in_reduction' clause}} expected-note {{previously referenced here}} foo(); -#pragma omp task in_reduction(+ : r) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp task in_reduction(+ : r) // expected-error {{const-qualified variable cannot be in_reduction}} foo(); #pragma omp parallel shared(i) #pragma omp parallel reduction(min : i) diff --git a/test/OpenMP/taskgroup_task_reduction_messages.cpp b/test/OpenMP/taskgroup_task_reduction_messages.cpp index 59ff2190bb..56abe2abe6 100644 --- a/test/OpenMP/taskgroup_task_reduction_messages.cpp +++ b/test/OpenMP/taskgroup_task_reduction_messages.cpp @@ -116,23 +116,23 @@ T tmain(T argc) { foo(); #pragma omp taskgroup task_reduction(^ : T) // expected-error {{'T' does not refer to a value}} foo(); -#pragma omp taskgroup task_reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified list item cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp taskgroup task_reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be task_reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} foo(); -#pragma omp taskgroup task_reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'task_reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified list item cannot be reduction}} +#pragma omp taskgroup task_reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'task_reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be task_reduction}} foo(); #pragma omp taskgroup task_reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} foo(); -#pragma omp taskgroup task_reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp taskgroup task_reduction(+ : ba) // expected-error {{const-qualified variable cannot be task_reduction}} foo(); -#pragma omp taskgroup task_reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp taskgroup task_reduction(* : ca) // expected-error {{const-qualified variable cannot be task_reduction}} foo(); -#pragma omp taskgroup task_reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} expected-error {{const-qualified list item cannot be reduction}} +#pragma omp taskgroup task_reduction(- : da) // expected-error {{const-qualified variable cannot be task_reduction}} expected-error {{const-qualified variable cannot be task_reduction}} foo(); #pragma omp taskgroup task_reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} foo(); #pragma omp taskgroup task_reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} foo(); -#pragma omp taskgroup task_reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp taskgroup task_reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be task_reduction}} foo(); #pragma omp taskgroup task_reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}} foo(); @@ -143,7 +143,7 @@ T tmain(T argc) { foo(); #pragma omp taskgroup task_reduction(+ : p), task_reduction(+ : p) // expected-error 2 {{variable can appear only once in OpenMP 'task_reduction' clause}} expected-note 2 {{previously referenced here}} foo(); -#pragma omp taskgroup task_reduction(+ : r) // expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp taskgroup task_reduction(+ : r) // expected-error 2 {{const-qualified variable cannot be task_reduction}} foo(); #pragma omp parallel shared(i) #pragma omp parallel reduction(min : i) @@ -209,23 +209,23 @@ int main(int argc, char **argv) { foo(); #pragma omp taskgroup task_reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} foo(); -#pragma omp taskgroup task_reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified list item cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} +#pragma omp taskgroup task_reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be task_reduction}} expected-error {{'operator+' is a private member of 'S2'}} foo(); -#pragma omp taskgroup task_reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'task_reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp taskgroup task_reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'task_reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be task_reduction}} foo(); #pragma omp taskgroup task_reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} foo(); -#pragma omp taskgroup task_reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp taskgroup task_reduction(+ : ba) // expected-error {{const-qualified variable cannot be task_reduction}} foo(); -#pragma omp taskgroup task_reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp taskgroup task_reduction(* : ca) // expected-error {{const-qualified variable cannot be task_reduction}} foo(); -#pragma omp taskgroup task_reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp taskgroup task_reduction(- : da) // expected-error {{const-qualified variable cannot be task_reduction}} foo(); #pragma omp taskgroup task_reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} foo(); #pragma omp taskgroup task_reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} foo(); -#pragma omp taskgroup task_reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp taskgroup task_reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be task_reduction}} foo(); #pragma omp taskgroup task_reduction(& : e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{nvalid operands to binary expression ('S4' and 'S4')}} expected-error {{calling a private constructor of class 'S5'}} expected-error {{invalid operands to binary expression ('S5' and 'S5')}} foo(); @@ -238,7 +238,7 @@ int main(int argc, char **argv) { foo(); #pragma omp taskgroup task_reduction(+ : p), task_reduction(+ : p) // expected-error {{variable can appear only once in OpenMP 'task_reduction' clause}} expected-note {{previously referenced here}} foo(); -#pragma omp taskgroup task_reduction(+ : r) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp taskgroup task_reduction(+ : r) // expected-error {{const-qualified variable cannot be task_reduction}} foo(); #pragma omp parallel shared(i) #pragma omp parallel reduction(min : i) diff --git a/test/OpenMP/taskloop_in_reduction_messages.cpp b/test/OpenMP/taskloop_in_reduction_messages.cpp index dc19bac907..177217888e 100644 --- a/test/OpenMP/taskloop_in_reduction_messages.cpp +++ b/test/OpenMP/taskloop_in_reduction_messages.cpp @@ -171,22 +171,22 @@ T tmain(T argc) { for (int i = 0; i < 10; ++i) foo(); #pragma omp taskgroup task_reduction(+:c) -#pragma omp taskloop in_reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified list item cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} expected-error 2 {{in_reduction variable must appear in a task_reduction clause}} +#pragma omp taskloop in_reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be in_reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} expected-error 2 {{in_reduction variable must appear in a task_reduction clause}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop in_reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'in_reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified list item cannot be reduction}} +#pragma omp taskloop in_reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'in_reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be in_reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop in_reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop in_reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp taskloop in_reduction(+ : ba) // expected-error {{const-qualified variable cannot be in_reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop in_reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp taskloop in_reduction(* : ca) // expected-error {{const-qualified variable cannot be in_reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop in_reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} expected-error {{const-qualified list item cannot be reduction}} +#pragma omp taskloop in_reduction(- : da) // expected-error {{const-qualified variable cannot be in_reduction}} expected-error {{const-qualified variable cannot be in_reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop in_reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} expected-error {{in_reduction variable must appear in a task_reduction clause}} @@ -195,7 +195,7 @@ T tmain(T argc) { #pragma omp taskloop in_reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop in_reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp taskloop in_reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be in_reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp taskgroup task_reduction(+:k) @@ -213,7 +213,7 @@ T tmain(T argc) { #pragma omp taskloop in_reduction(+ : p), in_reduction(+ : p) // expected-error 2 {{variable can appear only once in OpenMP 'in_reduction' clause}} expected-note 2 {{previously referenced here}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop in_reduction(+ : r) // expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp taskloop in_reduction(+ : r) // expected-error 2 {{const-qualified variable cannot be in_reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel shared(i) @@ -306,22 +306,22 @@ int main(int argc, char **argv) { for (int i = 0; i < 10; ++i) foo(); #pragma omp taskgroup task_reduction(+:c) -#pragma omp taskloop in_reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified list item cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} expected-error {{in_reduction variable must appear in a task_reduction clause}} +#pragma omp taskloop in_reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be in_reduction}} expected-error {{'operator+' is a private member of 'S2'}} expected-error {{in_reduction variable must appear in a task_reduction clause}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop in_reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'in_reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp taskloop in_reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'in_reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be in_reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop in_reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop in_reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp taskloop in_reduction(+ : ba) // expected-error {{const-qualified variable cannot be in_reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop in_reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp taskloop in_reduction(* : ca) // expected-error {{const-qualified variable cannot be in_reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop in_reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp taskloop in_reduction(- : da) // expected-error {{const-qualified variable cannot be in_reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop in_reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} @@ -330,7 +330,7 @@ int main(int argc, char **argv) { #pragma omp taskloop in_reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop in_reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp taskloop in_reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be in_reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop in_reduction(& : e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{nvalid operands to binary expression ('S4' and 'S4')}} expected-error {{calling a private constructor of class 'S5'}} expected-error {{invalid operands to binary expression ('S5' and 'S5')}} @@ -351,7 +351,7 @@ int main(int argc, char **argv) { #pragma omp taskloop in_reduction(+ : p), in_reduction(+ : p) // expected-error {{variable can appear only once in OpenMP 'in_reduction' clause}} expected-note {{previously referenced here}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop in_reduction(+ : r) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp taskloop in_reduction(+ : r) // expected-error {{const-qualified variable cannot be in_reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel shared(i) diff --git a/test/OpenMP/taskloop_reduction_messages.cpp b/test/OpenMP/taskloop_reduction_messages.cpp index c83a8b30c5..4794c7a2d0 100644 --- a/test/OpenMP/taskloop_reduction_messages.cpp +++ b/test/OpenMP/taskloop_reduction_messages.cpp @@ -139,22 +139,22 @@ T tmain(T argc) { #pragma omp taskloop reduction(^ : T) // expected-error {{'T' does not refer to a value}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified list item cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp taskloop reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified list item cannot be reduction}} +#pragma omp taskloop reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp taskloop reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp taskloop reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} expected-error {{const-qualified list item cannot be reduction}} +#pragma omp taskloop reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} @@ -163,7 +163,7 @@ T tmain(T argc) { #pragma omp taskloop reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp taskloop reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}} @@ -182,7 +182,7 @@ T tmain(T argc) { #pragma omp taskloop reduction(+ : p), reduction(+ : p) // expected-error 2 {{variable can appear only once in OpenMP 'reduction' clause}} expected-note 2 {{previously referenced here}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop reduction(+ : r) // expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp taskloop reduction(+ : r) // expected-error 2 {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel shared(i) @@ -261,22 +261,22 @@ int main(int argc, char **argv) { #pragma omp taskloop reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified list item cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} +#pragma omp taskloop reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp taskloop reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp taskloop reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp taskloop reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp taskloop reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} @@ -285,7 +285,7 @@ int main(int argc, char **argv) { #pragma omp taskloop reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp taskloop reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop reduction(& : e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{invalid operands to binary expression ('S4' and 'S4')}} expected-error {{calling a private constructor of class 'S5'}} expected-error {{invalid operands to binary expression ('S5' and 'S5')}} @@ -307,7 +307,7 @@ int main(int argc, char **argv) { #pragma omp taskloop reduction(+ : p), reduction(+ : p) // expected-error {{variable can appear only once in OpenMP 'reduction' clause}} expected-note {{previously referenced here}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop reduction(+ : r) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp taskloop reduction(+ : r) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel shared(i) diff --git a/test/OpenMP/taskloop_simd_in_reduction_messages.cpp b/test/OpenMP/taskloop_simd_in_reduction_messages.cpp index ee3d093766..5fa976b229 100644 --- a/test/OpenMP/taskloop_simd_in_reduction_messages.cpp +++ b/test/OpenMP/taskloop_simd_in_reduction_messages.cpp @@ -171,22 +171,22 @@ T tmain(T argc) { for (int i = 0; i < 10; ++i) foo(); #pragma omp taskgroup task_reduction(+:c) -#pragma omp taskloop simd in_reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified list item cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} expected-error 2 {{in_reduction variable must appear in a task_reduction clause}} +#pragma omp taskloop simd in_reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be in_reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} expected-error 2 {{in_reduction variable must appear in a task_reduction clause}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop simd in_reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'in_reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified list item cannot be reduction}} +#pragma omp taskloop simd in_reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'in_reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be in_reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop simd in_reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop simd in_reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp taskloop simd in_reduction(+ : ba) // expected-error {{const-qualified variable cannot be in_reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop simd in_reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp taskloop simd in_reduction(* : ca) // expected-error {{const-qualified variable cannot be in_reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop simd in_reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} expected-error {{const-qualified list item cannot be reduction}} +#pragma omp taskloop simd in_reduction(- : da) // expected-error {{const-qualified variable cannot be in_reduction}} expected-error {{const-qualified variable cannot be in_reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop simd in_reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} expected-error {{in_reduction variable must appear in a task_reduction clause}} @@ -195,7 +195,7 @@ T tmain(T argc) { #pragma omp taskloop simd in_reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop simd in_reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp taskloop simd in_reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be in_reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp taskgroup task_reduction(+:k) @@ -213,7 +213,7 @@ T tmain(T argc) { #pragma omp taskloop simd in_reduction(+ : p), in_reduction(+ : p) // expected-error 2 {{variable can appear only once in OpenMP 'in_reduction' clause}} expected-note 2 {{previously referenced here}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop simd in_reduction(+ : r) // expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp taskloop simd in_reduction(+ : r) // expected-error 2 {{const-qualified variable cannot be in_reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel shared(i) @@ -306,22 +306,22 @@ int main(int argc, char **argv) { for (int i = 0; i < 10; ++i) foo(); #pragma omp taskgroup task_reduction(+:c) -#pragma omp taskloop simd in_reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified list item cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} expected-error {{in_reduction variable must appear in a task_reduction clause}} +#pragma omp taskloop simd in_reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be in_reduction}} expected-error {{'operator+' is a private member of 'S2'}} expected-error {{in_reduction variable must appear in a task_reduction clause}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop simd in_reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'in_reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp taskloop simd in_reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'in_reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be in_reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop simd in_reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop simd in_reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp taskloop simd in_reduction(+ : ba) // expected-error {{const-qualified variable cannot be in_reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop simd in_reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp taskloop simd in_reduction(* : ca) // expected-error {{const-qualified variable cannot be in_reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop simd in_reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp taskloop simd in_reduction(- : da) // expected-error {{const-qualified variable cannot be in_reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop simd in_reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} @@ -330,7 +330,7 @@ int main(int argc, char **argv) { #pragma omp taskloop simd in_reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop simd in_reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp taskloop simd in_reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be in_reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop simd in_reduction(& : e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{nvalid operands to binary expression ('S4' and 'S4')}} expected-error {{calling a private constructor of class 'S5'}} expected-error {{invalid operands to binary expression ('S5' and 'S5')}} @@ -351,7 +351,7 @@ int main(int argc, char **argv) { #pragma omp taskloop simd in_reduction(+ : p), in_reduction(+ : p) // expected-error {{variable can appear only once in OpenMP 'in_reduction' clause}} expected-note {{previously referenced here}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop simd in_reduction(+ : r) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp taskloop simd in_reduction(+ : r) // expected-error {{const-qualified variable cannot be in_reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel shared(i) diff --git a/test/OpenMP/taskloop_simd_reduction_messages.cpp b/test/OpenMP/taskloop_simd_reduction_messages.cpp index 10ee5ce8c8..fb279e28b8 100644 --- a/test/OpenMP/taskloop_simd_reduction_messages.cpp +++ b/test/OpenMP/taskloop_simd_reduction_messages.cpp @@ -139,22 +139,22 @@ T tmain(T argc) { #pragma omp taskloop simd reduction(^ : T) // expected-error {{'T' does not refer to a value}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified list item cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp taskloop simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified list item cannot be reduction}} +#pragma omp taskloop simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop simd reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop simd reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp taskloop simd reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop simd reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp taskloop simd reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop simd reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} expected-error {{const-qualified list item cannot be reduction}} +#pragma omp taskloop simd reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop simd reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} @@ -163,7 +163,7 @@ T tmain(T argc) { #pragma omp taskloop simd reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop simd reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp taskloop simd reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop simd reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}} @@ -182,7 +182,7 @@ T tmain(T argc) { #pragma omp taskloop simd reduction(+ : p), reduction(+ : p) // expected-error 2 {{variable can appear only once in OpenMP 'reduction' clause}} expected-note 2 {{previously referenced here}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop simd reduction(+ : r) // expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp taskloop simd reduction(+ : r) // expected-error 2 {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel shared(i) @@ -261,22 +261,22 @@ int main(int argc, char **argv) { #pragma omp taskloop simd reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified list item cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} +#pragma omp taskloop simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp taskloop simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop simd reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop simd reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp taskloop simd reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop simd reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp taskloop simd reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop simd reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp taskloop simd reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop simd reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} @@ -285,7 +285,7 @@ int main(int argc, char **argv) { #pragma omp taskloop simd reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop simd reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp taskloop simd reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop simd reduction(& : e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{invalid operands to binary expression ('S4' and 'S4')}} expected-error {{calling a private constructor of class 'S5'}} expected-error {{invalid operands to binary expression ('S5' and 'S5')}} @@ -307,7 +307,7 @@ int main(int argc, char **argv) { #pragma omp taskloop simd reduction(+ : p), reduction(+ : p) // expected-error {{variable can appear only once in OpenMP 'reduction' clause}} expected-note {{previously referenced here}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop simd reduction(+ : r) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp taskloop simd reduction(+ : r) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel shared(i) diff --git a/test/OpenMP/teams_distribute_parallel_for_reduction_messages.cpp b/test/OpenMP/teams_distribute_parallel_for_reduction_messages.cpp index 31a91a862f..5eb69fd00b 100644 --- a/test/OpenMP/teams_distribute_parallel_for_reduction_messages.cpp +++ b/test/OpenMP/teams_distribute_parallel_for_reduction_messages.cpp @@ -125,22 +125,22 @@ T tmain(T argc) { #pragma omp teams distribute parallel for reduction(^ : T) // expected-error {{'T' does not refer to a value}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute parallel for reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified list item cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp teams distribute parallel for reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute parallel for reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified list item cannot be reduction}} +#pragma omp teams distribute parallel for reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target #pragma omp teams distribute parallel for reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute parallel for reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp teams distribute parallel for reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute parallel for reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp teams distribute parallel for reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute parallel for reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} expected-error {{const-qualified list item cannot be reduction}} +#pragma omp teams distribute parallel for reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target #pragma omp teams distribute parallel for reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} @@ -149,7 +149,7 @@ T tmain(T argc) { #pragma omp teams distribute parallel for reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute parallel for reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp teams distribute parallel for reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target #pragma omp teams distribute parallel for reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}} @@ -168,7 +168,7 @@ T tmain(T argc) { #pragma omp teams distribute parallel for reduction(+ : p), reduction(+ : p) // expected-error 2 {{variable can appear only once in OpenMP 'reduction' clause}} expected-note 2 {{previously referenced here}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute parallel for reduction(+ : r) // expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp teams distribute parallel for reduction(+ : r) // expected-error 2 {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp parallel shared(i) #pragma omp parallel reduction(min : i) @@ -242,22 +242,22 @@ int main(int argc, char **argv) { #pragma omp teams distribute parallel for reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute parallel for reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified list item cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} +#pragma omp teams distribute parallel for reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute parallel for reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp teams distribute parallel for reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target #pragma omp teams distribute parallel for reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute parallel for reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp teams distribute parallel for reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute parallel for reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp teams distribute parallel for reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute parallel for reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp teams distribute parallel for reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target #pragma omp teams distribute parallel for reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} @@ -266,7 +266,7 @@ int main(int argc, char **argv) { #pragma omp teams distribute parallel for reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute parallel for reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp teams distribute parallel for reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target #pragma omp teams distribute parallel for reduction(& : e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{invalid operands to binary expression ('S4' and 'S4')}} expected-error {{calling a private constructor of class 'S5'}} expected-error {{invalid operands to binary expression ('S5' and 'S5')}} @@ -288,7 +288,7 @@ int main(int argc, char **argv) { #pragma omp teams distribute parallel for reduction(+ : p), reduction(+ : p) // expected-error {{variable can appear only once in OpenMP 'reduction' clause}} expected-note {{previously referenced here}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute parallel for reduction(+ : r) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp teams distribute parallel for reduction(+ : r) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp parallel shared(i) #pragma omp parallel reduction(min : i) diff --git a/test/OpenMP/teams_distribute_parallel_for_simd_reduction_messages.cpp b/test/OpenMP/teams_distribute_parallel_for_simd_reduction_messages.cpp index a17ffe392b..9f203063f1 100644 --- a/test/OpenMP/teams_distribute_parallel_for_simd_reduction_messages.cpp +++ b/test/OpenMP/teams_distribute_parallel_for_simd_reduction_messages.cpp @@ -125,22 +125,22 @@ T tmain(T argc) { #pragma omp teams distribute parallel for simd reduction(^ : T) // expected-error {{'T' does not refer to a value}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute parallel for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified list item cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp teams distribute parallel for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute parallel for simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified list item cannot be reduction}} +#pragma omp teams distribute parallel for simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target #pragma omp teams distribute parallel for simd reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute parallel for simd reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp teams distribute parallel for simd reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute parallel for simd reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp teams distribute parallel for simd reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute parallel for simd reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} expected-error {{const-qualified list item cannot be reduction}} +#pragma omp teams distribute parallel for simd reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target #pragma omp teams distribute parallel for simd reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} @@ -149,7 +149,7 @@ T tmain(T argc) { #pragma omp teams distribute parallel for simd reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute parallel for simd reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp teams distribute parallel for simd reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target #pragma omp teams distribute parallel for simd reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}} @@ -168,7 +168,7 @@ T tmain(T argc) { #pragma omp teams distribute parallel for simd reduction(+ : p), reduction(+ : p) // expected-error 2 {{variable can appear only once in OpenMP 'reduction' clause}} expected-note 2 {{previously referenced here}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute parallel for simd reduction(+ : r) // expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp teams distribute parallel for simd reduction(+ : r) // expected-error 2 {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp parallel shared(i) #pragma omp parallel reduction(min : i) @@ -242,22 +242,22 @@ int main(int argc, char **argv) { #pragma omp teams distribute parallel for simd reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute parallel for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified list item cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} +#pragma omp teams distribute parallel for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute parallel for simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp teams distribute parallel for simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target #pragma omp teams distribute parallel for simd reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute parallel for simd reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp teams distribute parallel for simd reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute parallel for simd reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp teams distribute parallel for simd reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute parallel for simd reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp teams distribute parallel for simd reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target #pragma omp teams distribute parallel for simd reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} @@ -266,7 +266,7 @@ int main(int argc, char **argv) { #pragma omp teams distribute parallel for simd reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute parallel for simd reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp teams distribute parallel for simd reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target #pragma omp teams distribute parallel for simd reduction(& : e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{invalid operands to binary expression ('S4' and 'S4')}} expected-error {{calling a private constructor of class 'S5'}} expected-error {{invalid operands to binary expression ('S5' and 'S5')}} @@ -288,7 +288,7 @@ int main(int argc, char **argv) { #pragma omp teams distribute parallel for simd reduction(+ : p), reduction(+ : p) // expected-error {{variable can appear only once in OpenMP 'reduction' clause}} expected-note {{previously referenced here}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute parallel for simd reduction(+ : r) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp teams distribute parallel for simd reduction(+ : r) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp parallel shared(i) #pragma omp parallel reduction(min : i) diff --git a/test/OpenMP/teams_distribute_reduction_messages.cpp b/test/OpenMP/teams_distribute_reduction_messages.cpp index 4b9d6e51b2..f83dda6809 100644 --- a/test/OpenMP/teams_distribute_reduction_messages.cpp +++ b/test/OpenMP/teams_distribute_reduction_messages.cpp @@ -131,22 +131,22 @@ T tmain(T argc) { #pragma omp teams distribute reduction(^ : T) // expected-error {{'T' does not refer to a value}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified list item cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp teams distribute reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified list item cannot be reduction}} +#pragma omp teams distribute reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target #pragma omp teams distribute reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp teams distribute reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp teams distribute reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} expected-error {{const-qualified list item cannot be reduction}} +#pragma omp teams distribute reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target #pragma omp teams distribute reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} @@ -155,7 +155,7 @@ T tmain(T argc) { #pragma omp teams distribute reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp teams distribute reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target #pragma omp teams distribute reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}} @@ -174,7 +174,7 @@ T tmain(T argc) { #pragma omp teams distribute reduction(+ : p), reduction(+ : p) // expected-error 2 {{variable can appear only once in OpenMP 'reduction' clause}} expected-note 2 {{previously referenced here}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute reduction(+ : r) // expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp teams distribute reduction(+ : r) // expected-error 2 {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp parallel shared(i) #pragma omp parallel reduction(min : i) @@ -248,22 +248,22 @@ int main(int argc, char **argv) { #pragma omp teams distribute reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified list item cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} +#pragma omp teams distribute reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp teams distribute reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target #pragma omp teams distribute reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp teams distribute reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp teams distribute reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp teams distribute reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target #pragma omp teams distribute reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} @@ -272,7 +272,7 @@ int main(int argc, char **argv) { #pragma omp teams distribute reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp teams distribute reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target #pragma omp teams distribute reduction(& : e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{invalid operands to binary expression ('S4' and 'S4')}} expected-error {{calling a private constructor of class 'S5'}} expected-error {{invalid operands to binary expression ('S5' and 'S5')}} @@ -294,7 +294,7 @@ int main(int argc, char **argv) { #pragma omp teams distribute reduction(+ : p), reduction(+ : p) // expected-error {{variable can appear only once in OpenMP 'reduction' clause}} expected-note {{previously referenced here}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute reduction(+ : r) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp teams distribute reduction(+ : r) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp parallel shared(i) #pragma omp parallel reduction(min : i) diff --git a/test/OpenMP/teams_distribute_simd_reduction_messages.cpp b/test/OpenMP/teams_distribute_simd_reduction_messages.cpp index 49b45b7bc6..e590d3616d 100644 --- a/test/OpenMP/teams_distribute_simd_reduction_messages.cpp +++ b/test/OpenMP/teams_distribute_simd_reduction_messages.cpp @@ -125,22 +125,22 @@ T tmain(T argc) { #pragma omp teams distribute simd reduction(^ : T) // expected-error {{'T' does not refer to a value}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified list item cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp teams distribute simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified list item cannot be reduction}} +#pragma omp teams distribute simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target #pragma omp teams distribute simd reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute simd reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp teams distribute simd reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute simd reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp teams distribute simd reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute simd reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} expected-error {{const-qualified list item cannot be reduction}} +#pragma omp teams distribute simd reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target #pragma omp teams distribute simd reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} @@ -149,7 +149,7 @@ T tmain(T argc) { #pragma omp teams distribute simd reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute simd reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp teams distribute simd reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target #pragma omp teams distribute simd reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}} @@ -168,7 +168,7 @@ T tmain(T argc) { #pragma omp teams distribute simd reduction(+ : p), reduction(+ : p) // expected-error 2 {{variable can appear only once in OpenMP 'reduction' clause}} expected-note 2 {{previously referenced here}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute simd reduction(+ : r) // expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp teams distribute simd reduction(+ : r) // expected-error 2 {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp parallel shared(i) #pragma omp parallel reduction(min : i) @@ -242,22 +242,22 @@ int main(int argc, char **argv) { #pragma omp teams distribute simd reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified list item cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} +#pragma omp teams distribute simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp teams distribute simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target #pragma omp teams distribute simd reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute simd reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp teams distribute simd reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute simd reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp teams distribute simd reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute simd reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp teams distribute simd reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target #pragma omp teams distribute simd reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} @@ -266,7 +266,7 @@ int main(int argc, char **argv) { #pragma omp teams distribute simd reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute simd reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp teams distribute simd reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target #pragma omp teams distribute simd reduction(& : e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{invalid operands to binary expression ('S4' and 'S4')}} expected-error {{calling a private constructor of class 'S5'}} expected-error {{invalid operands to binary expression ('S5' and 'S5')}} @@ -288,7 +288,7 @@ int main(int argc, char **argv) { #pragma omp teams distribute simd reduction(+ : p), reduction(+ : p) // expected-error {{variable can appear only once in OpenMP 'reduction' clause}} expected-note {{previously referenced here}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute simd reduction(+ : r) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp teams distribute simd reduction(+ : r) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp parallel shared(i) #pragma omp parallel reduction(min : i) diff --git a/test/OpenMP/teams_reduction_messages.cpp b/test/OpenMP/teams_reduction_messages.cpp index 94a47436c1..37f58f8b17 100644 --- a/test/OpenMP/teams_reduction_messages.cpp +++ b/test/OpenMP/teams_reduction_messages.cpp @@ -131,22 +131,22 @@ T tmain(T argc) { #pragma omp teams reduction(^ : T) // expected-error {{'T' does not refer to a value}} foo(); #pragma omp target -#pragma omp teams reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified list item cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp teams reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} foo(); #pragma omp target -#pragma omp teams reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified list item cannot be reduction}} +#pragma omp teams reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} foo(); #pragma omp target #pragma omp teams reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} foo(); #pragma omp target -#pragma omp teams reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp teams reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} foo(); #pragma omp target -#pragma omp teams reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp teams reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} foo(); #pragma omp target -#pragma omp teams reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} expected-error {{const-qualified list item cannot be reduction}} +#pragma omp teams reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} expected-error {{const-qualified variable cannot be reduction}} foo(); #pragma omp target #pragma omp teams reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} @@ -155,7 +155,7 @@ T tmain(T argc) { #pragma omp teams reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} foo(); #pragma omp target -#pragma omp teams reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp teams reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} foo(); #pragma omp target #pragma omp teams reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}} @@ -174,7 +174,7 @@ T tmain(T argc) { #pragma omp teams reduction(+ : p), reduction(+ : p) // expected-error 2 {{variable can appear only once in OpenMP 'reduction' clause}} expected-note 2 {{previously referenced here}} foo(); #pragma omp target -#pragma omp teams reduction(+ : r) // expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp teams reduction(+ : r) // expected-error 2 {{const-qualified variable cannot be reduction}} foo(); #pragma omp parallel shared(i) #pragma omp parallel reduction(min : i) @@ -261,22 +261,22 @@ int main(int argc, char **argv) { #pragma omp teams reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} foo(); #pragma omp target -#pragma omp teams reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified list item cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} +#pragma omp teams reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} foo(); #pragma omp target -#pragma omp teams reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified list item cannot be reduction}} +#pragma omp teams reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}} foo(); #pragma omp target #pragma omp teams reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} foo(); #pragma omp target -#pragma omp teams reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp teams reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} foo(); #pragma omp target -#pragma omp teams reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp teams reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} foo(); #pragma omp target -#pragma omp teams reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp teams reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} foo(); #pragma omp target #pragma omp teams reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} @@ -285,7 +285,7 @@ int main(int argc, char **argv) { #pragma omp teams reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} foo(); #pragma omp target -#pragma omp teams reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp teams reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} foo(); #pragma omp target #pragma omp teams reduction(& : e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{invalid operands to binary expression ('S4' and 'S4')}} expected-error {{calling a private constructor of class 'S5'}} expected-error {{invalid operands to binary expression ('S5' and 'S5')}} @@ -307,7 +307,7 @@ int main(int argc, char **argv) { #pragma omp teams reduction(+ : p), reduction(+ : p) // expected-error {{variable can appear only once in OpenMP 'reduction' clause}} expected-note {{previously referenced here}} foo(); #pragma omp target -#pragma omp teams reduction(+ : r) // expected-error {{const-qualified list item cannot be reduction}} +#pragma omp teams reduction(+ : r) // expected-error {{const-qualified variable cannot be reduction}} foo(); #pragma omp parallel shared(i) #pragma omp parallel reduction(min : i) -- 2.40.0