diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2015-05-21 09:47:46 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2015-05-21 09:47:46 +0000 |
commit | 5129d3a4f58c7514a31d49da5c7c70c17aaa9a8f (patch) | |
tree | 949ba9c1c89f75d50cc59e708639b8a4db3e0a74 | |
parent | 2db1a03b07ce4d22ad32ebbecdc2099b0e67524e (diff) | |
download | bcm5719-llvm-5129d3a4f58c7514a31d49da5c7c70c17aaa9a8f.tar.gz bcm5719-llvm-5129d3a4f58c7514a31d49da5c7c70c17aaa9a8f.zip |
[OPENMP] Fixed codegen for parameters privatization.
For parameters we shall take a derived type of parameters, not the original one.
llvm-svn: 237882
-rw-r--r-- | clang/lib/CodeGen/CGOpenMPRuntime.cpp | 9 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGStmtOpenMP.cpp | 9 | ||||
-rw-r--r-- | clang/lib/Sema/SemaOpenMP.cpp | 39 | ||||
-rw-r--r-- | clang/test/OpenMP/for_firstprivate_messages.cpp | 4 | ||||
-rw-r--r-- | clang/test/OpenMP/for_lastprivate_messages.cpp | 4 | ||||
-rw-r--r-- | clang/test/OpenMP/for_private_messages.cpp | 4 | ||||
-rw-r--r-- | clang/test/OpenMP/parallel_firstprivate_codegen.cpp | 14 | ||||
-rw-r--r-- | clang/test/OpenMP/single_codegen.cpp | 6 | ||||
-rw-r--r-- | clang/test/OpenMP/single_copyprivate_messages.cpp | 6 | ||||
-rw-r--r-- | clang/test/OpenMP/task_firstprivate_codegen.cpp | 10 | ||||
-rw-r--r-- | clang/test/OpenMP/task_firstprivate_messages.cpp | 4 | ||||
-rw-r--r-- | clang/test/OpenMP/task_private_codegen.cpp | 10 | ||||
-rw-r--r-- | clang/test/OpenMP/task_private_messages.cpp | 4 |
13 files changed, 32 insertions, 91 deletions
diff --git a/clang/lib/CodeGen/CGOpenMPRuntime.cpp b/clang/lib/CodeGen/CGOpenMPRuntime.cpp index a8665254545..789302c8855 100644 --- a/clang/lib/CodeGen/CGOpenMPRuntime.cpp +++ b/clang/lib/CodeGen/CGOpenMPRuntime.cpp @@ -1289,9 +1289,6 @@ static llvm::Value *emitCopyprivateCopyFunction( CGF.ConvertTypeForMem(C.getPointerType(SrcExprs[I]->getType()))); auto *VD = cast<DeclRefExpr>(CopyprivateVars[I])->getDecl(); QualType Type = VD->getType(); - if (auto *PVD = dyn_cast<ParmVarDecl>(VD)) { - Type = PVD->getOriginalType(); - } CGF.EmitOMPCopy(CGF, Type, DestAddr, SrcAddr, cast<VarDecl>(cast<DeclRefExpr>(DestExprs[I])->getDecl()), cast<VarDecl>(cast<DeclRefExpr>(SrcExprs[I])->getDecl()), @@ -1671,9 +1668,6 @@ createPrivatesRecordDecl(CodeGenModule &CGM, RD->startDefinition(); for (auto &&Pair : Privates) { auto Type = Pair.second.Original->getType(); - if (auto *PVD = dyn_cast<ParmVarDecl>(Pair.second.Original)) { - Type = PVD->getOriginalType(); - } Type = Type.getNonReferenceType(); addFieldToRecordDecl(C, RD, Type); } @@ -1960,9 +1954,6 @@ void CGOpenMPRuntime::emitTaskCall( auto SharedRefLValue = CGF.EmitLValueForField(SharedsBase, SharedField); QualType Type = OriginalVD->getType(); - if (auto *PVD = dyn_cast<ParmVarDecl>(OriginalVD)) { - Type = PVD->getOriginalType(); - } if (Type->isArrayType()) { // Initialize firstprivate array. if (!isa<CXXConstructExpr>(Init) || diff --git a/clang/lib/CodeGen/CGStmtOpenMP.cpp b/clang/lib/CodeGen/CGStmtOpenMP.cpp index 4a4c06f7e1c..78412e47345 100644 --- a/clang/lib/CodeGen/CGStmtOpenMP.cpp +++ b/clang/lib/CodeGen/CGStmtOpenMP.cpp @@ -133,9 +133,6 @@ bool CodeGenFunction::EmitOMPFirstprivateClause(const OMPExecutableDirective &D, (*IRef)->getType(), VK_LValue, (*IRef)->getExprLoc()); auto *OriginalAddr = EmitLValue(&DRE).getAddress(); QualType Type = OrigVD->getType(); - if (auto *PVD = dyn_cast<ParmVarDecl>(OrigVD)) { - Type = PVD->getOriginalType(); - } if (Type->isArrayType()) { // Emit VarDecl with copy init for arrays. // Get the address of the original variable captured in current @@ -229,9 +226,6 @@ bool CodeGenFunction::EmitOMPCopyinClause(const OMPExecutableDirective &D) { for (auto *AssignOp : C->assignment_ops()) { auto *VD = cast<VarDecl>(cast<DeclRefExpr>(*IRef)->getDecl()); QualType Type = VD->getType(); - if (auto *PVD = dyn_cast<ParmVarDecl>(VD)) { - Type = PVD->getOriginalType(); - } if (CopiedVars.insert(VD->getCanonicalDecl()).second) { // Get the address of the master variable. auto *MasterAddr = VD->isStaticLocal() @@ -355,9 +349,6 @@ void CodeGenFunction::EmitOMPLastprivateClauseFinal( for (auto *AssignOp : C->assignment_ops()) { auto *PrivateVD = cast<VarDecl>(cast<DeclRefExpr>(*IRef)->getDecl()); QualType Type = PrivateVD->getType(); - if (auto *PVD = dyn_cast<ParmVarDecl>(PrivateVD)) { - Type = PVD->getOriginalType(); - } auto *CanonicalVD = PrivateVD->getCanonicalDecl(); if (AlreadyEmittedVars.insert(CanonicalVD).second) { // If lastprivate variable is a loop control variable for loop-based diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp index c7d0c148ba0..ee6bdb21e55 100644 --- a/clang/lib/Sema/SemaOpenMP.cpp +++ b/clang/lib/Sema/SemaOpenMP.cpp @@ -505,9 +505,6 @@ DSAStackTy::DSAVarData DSAStackTy::getTopDSA(VarDecl *D, bool FromParent) { } QualType Type = D->getType().getNonReferenceType().getCanonicalType(); - if (auto *PVD = dyn_cast<ParmVarDecl>(D)) { - Type = PVD->getOriginalType().getNonReferenceType().getCanonicalType(); - } bool IsConstant = Type.isConstant(SemaRef.getASTContext()); Type = SemaRef.getASTContext().getBaseElementType(Type); // OpenMP [2.9.1.1, Data-sharing Attribute Rules for Variables Referenced @@ -664,9 +661,6 @@ void Sema::EndOpenMPDSABlock(Stmt *CurDirective) { } auto *VD = cast<VarDecl>(cast<DeclRefExpr>(DE)->getDecl()); QualType Type = VD->getType(); - if (auto *PVD = dyn_cast<ParmVarDecl>(VD)) { - Type = PVD->getOriginalType(); - } auto DVar = DSAStack->getTopDSA(VD, false); if (DVar.CKind == OMPC_lastprivate) { // Generate helper private variable and initialize it with the @@ -4761,9 +4755,6 @@ OMPClause *Sema::ActOnOpenMPPrivateClause(ArrayRef<Expr *> VarList, VarDecl *VD = cast<VarDecl>(D); QualType Type = VD->getType(); - if (auto *PVD = dyn_cast<ParmVarDecl>(VD)) { - Type = PVD->getOriginalType(); - } if (Type->isDependentType() || Type->isInstantiationDependentType()) { // It will be analyzed later. Vars.push_back(DE); @@ -4805,7 +4796,7 @@ OMPClause *Sema::ActOnOpenMPPrivateClause(ArrayRef<Expr *> VarList, } // Variably modified types are not supported for tasks. - if (Type->isVariablyModifiedType() && + if (!Type->isAnyPointerType() && Type->isVariablyModifiedType() && DSAStack->getCurrentDirective() == OMPD_task) { Diag(ELoc, diag::err_omp_variably_modified_type_not_supported) << getOpenMPClauseName(OMPC_private) << Type @@ -4907,9 +4898,6 @@ OMPClause *Sema::ActOnOpenMPFirstprivateClause(ArrayRef<Expr *> VarList, VarDecl *VD = cast<VarDecl>(D); QualType Type = VD->getType(); - if (auto *PVD = dyn_cast<ParmVarDecl>(VD)) { - Type = PVD->getOriginalType(); - } if (Type->isDependentType() || Type->isInstantiationDependentType()) { // It will be analyzed later. Vars.push_back(DE); @@ -5036,7 +5024,7 @@ OMPClause *Sema::ActOnOpenMPFirstprivateClause(ArrayRef<Expr *> VarList, } // Variably modified types are not supported for tasks. - if (Type->isVariablyModifiedType() && + if (!Type->isAnyPointerType() && Type->isVariablyModifiedType() && DSAStack->getCurrentDirective() == OMPD_task) { Diag(ELoc, diag::err_omp_variably_modified_type_not_supported) << getOpenMPClauseName(OMPC_firstprivate) << Type @@ -5143,9 +5131,6 @@ OMPClause *Sema::ActOnOpenMPLastprivateClause(ArrayRef<Expr *> VarList, VarDecl *VD = cast<VarDecl>(D); QualType Type = VD->getType(); - if (auto *PVD = dyn_cast<ParmVarDecl>(VD)) { - Type = PVD->getOriginalType(); - } if (Type->isDependentType() || Type->isInstantiationDependentType()) { // It will be analyzed later. Vars.push_back(DE); @@ -5280,9 +5265,6 @@ OMPClause *Sema::ActOnOpenMPSharedClause(ArrayRef<Expr *> VarList, VarDecl *VD = cast<VarDecl>(D); QualType Type = VD->getType(); - if (auto *PVD = dyn_cast<ParmVarDecl>(VD)) { - Type = PVD->getOriginalType(); - } if (Type->isDependentType() || Type->isInstantiationDependentType()) { // It will be analyzed later. Vars.push_back(DE); @@ -5492,9 +5474,6 @@ OMPClause *Sema::ActOnOpenMPReductionClause( auto D = DE->getDecl(); auto VD = cast<VarDecl>(D); auto Type = VD->getType(); - if (auto *PVD = dyn_cast<ParmVarDecl>(VD)) { - Type = PVD->getOriginalType(); - } // OpenMP [2.9.3.3, Restrictions, C/C++, p.3] // A variable that appears in a private clause must not have an incomplete // type or a reference type. @@ -5825,9 +5804,6 @@ OMPClause *Sema::ActOnOpenMPLinearClause(ArrayRef<Expr *> VarList, Expr *Step, } QualType QType = VD->getType(); - if (auto *PVD = dyn_cast<ParmVarDecl>(VD)) { - QType = PVD->getOriginalType(); - } if (QType->isDependentType() || QType->isInstantiationDependentType()) { // It will be analyzed later. Vars.push_back(DE); @@ -6008,9 +5984,6 @@ OMPClause *Sema::ActOnOpenMPAlignedClause( // The type of list items appearing in the aligned clause must be // array, pointer, reference to array, or reference to pointer. QualType QType = VD->getType(); - if (auto *PVD = dyn_cast<ParmVarDecl>(VD)) { - QType = PVD->getOriginalType(); - } QType = QType.getNonReferenceType().getUnqualifiedType().getCanonicalType(); const Type *Ty = QType.getTypePtrOrNull(); if (!Ty || (!Ty->isDependentType() && !Ty->isArrayType() && @@ -6090,9 +6063,6 @@ OMPClause *Sema::ActOnOpenMPCopyinClause(ArrayRef<Expr *> VarList, VarDecl *VD = cast<VarDecl>(D); QualType Type = VD->getType(); - if (auto *PVD = dyn_cast<ParmVarDecl>(VD)) { - Type = PVD->getOriginalType(); - } if (Type->isDependentType() || Type->isInstantiationDependentType()) { // It will be analyzed later. Vars.push_back(DE); @@ -6183,9 +6153,6 @@ OMPClause *Sema::ActOnOpenMPCopyprivateClause(ArrayRef<Expr *> VarList, VarDecl *VD = cast<VarDecl>(D); QualType Type = VD->getType(); - if (auto *PVD = dyn_cast<ParmVarDecl>(VD)) { - Type = PVD->getOriginalType(); - } if (Type->isDependentType() || Type->isInstantiationDependentType()) { // It will be analyzed later. Vars.push_back(DE); @@ -6225,7 +6192,7 @@ OMPClause *Sema::ActOnOpenMPCopyprivateClause(ArrayRef<Expr *> VarList, } // Variably modified types are not supported. - if (Type->isVariablyModifiedType()) { + if (!Type->isAnyPointerType() && Type->isVariablyModifiedType()) { Diag(ELoc, diag::err_omp_variably_modified_type_not_supported) << getOpenMPClauseName(OMPC_copyprivate) << Type << getOpenMPDirectiveName(DSAStack->getCurrentDirective()); diff --git a/clang/test/OpenMP/for_firstprivate_messages.cpp b/clang/test/OpenMP/for_firstprivate_messages.cpp index f22a33eee9b..2ec81104e77 100644 --- a/clang/test/OpenMP/for_firstprivate_messages.cpp +++ b/clang/test/OpenMP/for_firstprivate_messages.cpp @@ -35,7 +35,7 @@ extern const int f; class S4 { int a; S4(); - S4(const S4 &s4); // expected-note 3 {{implicitly declared private here}} + S4(const S4 &s4); // expected-note 2 {{implicitly declared private here}} public: S4(int v) : a(v) {} @@ -154,7 +154,7 @@ int foomain(int argc, char **argv) { void bar(S4 a[2]) { #pragma omp parallel -#pragma omp for firstprivate(a) // expected-error {{calling a private constructor of class 'S4'}} +#pragma omp for firstprivate(a) for (int i = 0; i < 2; ++i) foo(); } diff --git a/clang/test/OpenMP/for_lastprivate_messages.cpp b/clang/test/OpenMP/for_lastprivate_messages.cpp index c3551e2fbab..2fa14b63bd1 100644 --- a/clang/test/OpenMP/for_lastprivate_messages.cpp +++ b/clang/test/OpenMP/for_lastprivate_messages.cpp @@ -36,7 +36,7 @@ const S3 ca[5]; // expected-note {{global variable is predetermined as share extern const int f; // expected-note {{global variable is predetermined as shared}} class S4 { int a; - S4(); // expected-note 4 {{implicitly declared private here}} + S4(); // expected-note 3 {{implicitly declared private here}} S4(const S4 &s4); public: @@ -144,7 +144,7 @@ int foomain(int argc, char **argv) { void bar(S4 a[2]) { #pragma omp parallel -#pragma omp for lastprivate(a) // expected-error {{calling a private constructor of class 'S4'}} +#pragma omp for lastprivate(a) for (int i = 0; i < 2; ++i) foo(); } diff --git a/clang/test/OpenMP/for_private_messages.cpp b/clang/test/OpenMP/for_private_messages.cpp index 3ea0e5460f2..225a1beb99e 100644 --- a/clang/test/OpenMP/for_private_messages.cpp +++ b/clang/test/OpenMP/for_private_messages.cpp @@ -26,7 +26,7 @@ public: const S3 ca[5]; class S4 { int a; - S4(); // expected-note 2 {{implicitly declared private here}} + S4(); // expected-note {{implicitly declared private here}} public: S4(int v) : a(v) {} @@ -110,7 +110,7 @@ int foomain(I argc, C **argv) { void bar(S4 a[2]) { #pragma omp parallel -#pragma omp for private(a) // expected-error {{calling a private constructor of class 'S4'}} +#pragma omp for private(a) for (int i = 0; i < 2; ++i) foo(); } diff --git a/clang/test/OpenMP/parallel_firstprivate_codegen.cpp b/clang/test/OpenMP/parallel_firstprivate_codegen.cpp index 00918f67ef6..3f61362a3d9 100644 --- a/clang/test/OpenMP/parallel_firstprivate_codegen.cpp +++ b/clang/test/OpenMP/parallel_firstprivate_codegen.cpp @@ -250,19 +250,19 @@ struct St { ~St() {} }; -void array_func(int a[3], St s[2], int n, long double vla1[n]) { +void array_func(float a[3], St s[2], int n, long double vla1[n]) { double vla2[n]; // ARRAY: @__kmpc_fork_call( -// ARRAY: call void @llvm.memcpy.p0i8.p0i8.i64(i8* %{{.+}}, i8* %{{.+}}, i64 12, i32 4, i1 false) -// ARRAY: call void @_ZN2StC1ERKS_(%struct.St* %{{.+}}, %struct.St* dereferenceable(8) %{{.+}} +// ARRAY: [[PRIV_A:%.+]] = alloca float* +// ARRAY: [[PRIV_S:%.+]] = alloca %struct.St* +// ARRAY: [[PRIV_VLA1:%.+]] = alloca x86_fp80* +// ARRAY: store float* %{{.+}}, float** [[PRIV_A]], +// ARRAY: store %struct.St* %{{.+}}, %struct.St** [[PRIV_S]], +// ARRAY: store x86_fp80* %{{.+}}, x86_fp80** [[PRIV_VLA1]], // ARRAY: call i8* @llvm.stacksave() -// ARRAY: [[SIZE:%.+]] = mul nuw i64 %{{.+}}, 16 -// ARRAY: call void @llvm.memcpy.p0i8.p0i8.i64(i8* %{{.+}}, i8* %{{.+}}, i64 [[SIZE]], i32 16, i1 false) // ARRAY: [[SIZE:%.+]] = mul nuw i64 %{{.+}}, 8 // ARRAY: call void @llvm.memcpy.p0i8.p0i8.i64(i8* %{{.+}}, i8* %{{.+}}, i64 [[SIZE]], i32 8, i1 false) // ARRAY: call void @llvm.stackrestore(i8* -// ARRAY: call void @_ZN2StD1Ev(%struct.St* %{{.+}}) -// ARRAY: br i1 #pragma omp parallel firstprivate(a, s, vla1, vla2) ; } diff --git a/clang/test/OpenMP/single_codegen.cpp b/clang/test/OpenMP/single_codegen.cpp index d3ad969b37f..0593b2aa751 100644 --- a/clang/test/OpenMP/single_codegen.cpp +++ b/clang/test/OpenMP/single_codegen.cpp @@ -178,12 +178,12 @@ struct St { ~St() {} }; -void array_func(int a[3], St s[2]) { +void array_func(int n, int a[n], St s[2]) { // ARRAY: call void @__kmpc_copyprivate(%ident_t* @{{.+}}, i32 %{{.+}}, i64 16, i8* %{{.+}}, void (i8*, i8*)* [[CPY:@.+]], i32 %{{.+}}) #pragma omp single copyprivate(a, s) ; } // ARRAY: define internal void [[CPY]] -// ARRAY: call void @llvm.memcpy.p0i8.p0i8.i64(i8* %{{.+}}, i8* %{{.+}}, i64 12, i32 4, i1 false) -// ARRAY: call dereferenceable(8) %struct.St* @_ZN2StaSERKS_(%struct.St* %{{.+}}, %struct.St* dereferenceable(8) %{{.+}}) +// ARRAY: store i32* %{{.+}}, i32** %{{.+}}, +// ARRAY: store %struct.St* %{{.+}}, %struct.St** %{{.+}}, #endif diff --git a/clang/test/OpenMP/single_copyprivate_messages.cpp b/clang/test/OpenMP/single_copyprivate_messages.cpp index 0995eb07b99..4714753f494 100644 --- a/clang/test/OpenMP/single_copyprivate_messages.cpp +++ b/clang/test/OpenMP/single_copyprivate_messages.cpp @@ -21,7 +21,7 @@ public: class S4 { int a; S4(); - S4 &operator=(const S4 &s4); // expected-note 4 {{implicitly declared private here}} + S4 &operator=(const S4 &s4); // expected-note 3 {{implicitly declared private here}} public: S4(int v) : a(v) {} @@ -105,8 +105,8 @@ T tmain(T argc, C **argv) { return T(); } -void bar(S4 a[2], int n, int b[n]) { // expected-note {{'b' defined here}} -#pragma omp single copyprivate(a, b) // expected-error {{'operator=' is a private member of 'S4'}} expected-error {{arguments of OpenMP clause 'copyprivate' in '#pragma omp single' directive cannot be of variably-modified type 'int [n]'}} +void bar(S4 a[2], int n, int b[n]) { +#pragma omp single copyprivate(a, b) foo(); } diff --git a/clang/test/OpenMP/task_firstprivate_codegen.cpp b/clang/test/OpenMP/task_firstprivate_codegen.cpp index a5eb20cf460..449be6815af 100644 --- a/clang/test/OpenMP/task_firstprivate_codegen.cpp +++ b/clang/test/OpenMP/task_firstprivate_codegen.cpp @@ -408,15 +408,11 @@ struct St { ~St() {} }; -void array_func(int a[3], St s[2]) { +void array_func(int n, float a[n], St s[2]) { // ARRAY: call i8* @__kmpc_omp_task_alloc( -// ARRAY: call void @llvm.memcpy.p0i8.p0i8.i64(i8* %{{.+}}, i8* %{{.+}}, i64 12, i32 4, i1 false) -// ARRAY: call void @_ZN2StC1ERKS_(%struct.St* %{{.+}}, %struct.St* dereferenceable(8) %{{.+}}) -// ARRAY: store i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[DESTRUCTORS:@.+]] to i32 (i32, i8*)*), i32 (i32, i8*)** %{{.+}}, +// ARRAY: store float** %{{.+}}, float*** %{{.+}}, +// ARRAY: store %struct.St** %{{.+}}, %struct.St*** %{{.+}}, // ARRAY: call i32 @__kmpc_omp_task( -// ARRAY: define internal i32 [[DESTRUCTORS]](i32, -// ARRAY: call void @_ZN2StD1Ev(%struct.St* %{{.+}}) -// ARRAY: br i1 #pragma omp task firstprivate(a, s) ; } diff --git a/clang/test/OpenMP/task_firstprivate_messages.cpp b/clang/test/OpenMP/task_firstprivate_messages.cpp index 6052ac588b9..0126d47c50f 100644 --- a/clang/test/OpenMP/task_firstprivate_messages.cpp +++ b/clang/test/OpenMP/task_firstprivate_messages.cpp @@ -51,8 +51,8 @@ public: S3 h; #pragma omp threadprivate(h) // expected-note {{defined as threadprivate or thread local}} -void bar(int n, int b[n]) { // expected-note {{'b' defined here}} -#pragma omp task firstprivate(b) // expected-error {{arguments of OpenMP clause 'firstprivate' in '#pragma omp task' directive cannot be of variably-modified type 'int [n]'}} +void bar(int n, int b[n]) { +#pragma omp task firstprivate(b) foo(); } diff --git a/clang/test/OpenMP/task_private_codegen.cpp b/clang/test/OpenMP/task_private_codegen.cpp index b97b2f7d906..e6f11d3e85a 100644 --- a/clang/test/OpenMP/task_private_codegen.cpp +++ b/clang/test/OpenMP/task_private_codegen.cpp @@ -371,15 +371,11 @@ struct St { ~St() {} }; -void array_func(int a[2], St s[2]) { +void array_func(int n, float a[n], St s[2]) { // ARRAY: call i8* @__kmpc_omp_task_alloc( -// ARRAY-NOT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* %{{.+}}, i8* %{{.+}}, i64 12, i32 4, i1 false) -// ARRAY: call void @_ZN2StC1Ev(%struct.St* %{{.+}}) -// ARRAY: store i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[DESTRUCTORS:@.+]] to i32 (i32, i8*)*), i32 (i32, i8*)** %{{.+}}, +// ARRAY: store float** %{{.+}}, float*** %{{.+}}, +// ARRAY: store %struct.St** %{{.+}}, %struct.St*** %{{.+}}, // ARRAY: call i32 @__kmpc_omp_task( -// ARRAY: define internal i32 [[DESTRUCTORS]](i32, -// ARRAY: call void @_ZN2StD1Ev(%struct.St* %{{.+}}) -// ARRAY: br i1 #pragma omp task private(a, s) ; } diff --git a/clang/test/OpenMP/task_private_messages.cpp b/clang/test/OpenMP/task_private_messages.cpp index 34f647b0c53..c2c1f519d0c 100644 --- a/clang/test/OpenMP/task_private_messages.cpp +++ b/clang/test/OpenMP/task_private_messages.cpp @@ -45,8 +45,8 @@ public: int threadvar; #pragma omp threadprivate(threadvar) // expected-note {{defined as threadprivate or thread local}} -void bar(int n, int b[n]) { // expected-note {{'b' defined here}} -#pragma omp task private(b) // expected-error {{arguments of OpenMP clause 'private' in '#pragma omp task' directive cannot be of variably-modified type 'int [n]'}} +void bar(int n, int b[n]) { +#pragma omp task private(b) foo(); } |