<html><body><p>Removed patch to debug buildbot failure. Thanks.<br><br><img width="16" height="16" src="cid:3__=8FBBF5DFDFEA042C8f9e8a93df938690918c8FB@" border="0" alt="Inactive hide details for Kostya Serebryany ---02/01/2016 04:48:34 PM---From: Kostya Serebryany <kcc@google.com> To: Arpith C J"><font color="#424282">Kostya Serebryany ---02/01/2016 04:48:34 PM---From: Kostya Serebryany <kcc@google.com> To: Arpith C Jacob/Watson/IBM@IBMUS</font><br><br><font size="2" color="#5F5F5F">From: </font><font size="2">Kostya Serebryany <kcc@google.com></font><br><font size="2" color="#5F5F5F">To: </font><font size="2">Arpith C Jacob/Watson/IBM@IBMUS</font><br><font size="2" color="#5F5F5F">Cc: </font><font size="2">cfe-commits <cfe-commits@lists.llvm.org></font><br><font size="2" color="#5F5F5F">Date: </font><font size="2">02/01/2016 04:48 PM</font><br><font size="2" color="#5F5F5F">Subject: </font><font size="2">Re: r259366 - [OpenMP] Prevent nesting of target constructs within target code execution regions.</font><br><hr width="100%" size="2" align="left" noshade style="color:#8091A5; "><br><br><br><font size="4">We are seeing failures on the bots, likely related to this patch. Please take a look ASAP. </font><br><a href="http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/9806/steps/check-clang%20ubsan/logs/stdio"><u><font size="4" color="#0000FF">http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/9806/steps/check-clang%20ubsan/logs/stdio</font></u></a><br><font size="4" face="Courier New">/mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/tools/clang/lib/Sema/SemaOpenMP.cpp:2683:25: runtime error: load of value 419385984, which is not a valid value for type 'clang::OpenMPDirectiveKind'<br></font><br><font size="4">--kcc </font><br><br><font size="4">On Mon, Feb 1, 2016 at 8:32 AM, Arpith Chacko Jacob via cfe-commits <</font><a href="mailto:cfe-commits@lists.llvm.org" target="_blank"><u><font size="4" color="#0000FF">cfe-commits@lists.llvm.org</font></u></a><font size="4">> wrote:</font><ul><font size="4">Author: arpith<br>Date: Mon Feb 1 10:32:47 2016<br>New Revision: 259366<br><br>URL: </font><a href="http://llvm.org/viewvc/llvm-project?rev=259366&view=rev" target="_blank"><u><font size="4" color="#0000FF">http://llvm.org/viewvc/llvm-project?rev=259366&view=rev</font></u></a><font size="4"><br>Log:<br>[OpenMP] Prevent nesting of target constructs within target code execution regions.<br><br>Summary:<br>This patch enhances Sema to check for the following restriction:<br><br>OpenMP 4.5 [2.17 Nesting of Regions]<br>If a target, target update, target data, target enter data, or<br>target exit data construct is encountered during execution of a<br>target region, the behavior is unspecified.<br><br>Reviewers: ABataev<br><br>Differential Revision: </font><a href="http://reviews.llvm.org/D16758" target="_blank"><u><font size="4" color="#0000FF">http://reviews.llvm.org/D16758</font></u></a><font size="4"><br><br><br>Modified:<br> cfe/trunk/include/clang/Basic/OpenMPKinds.h<br> cfe/trunk/lib/Basic/OpenMPKinds.cpp<br> cfe/trunk/lib/Sema/SemaOpenMP.cpp<br> cfe/trunk/test/OpenMP/distribute_private_messages.cpp<br> cfe/trunk/test/OpenMP/nesting_of_regions.cpp<br> cfe/trunk/test/OpenMP/target_data_device_messages.cpp<br> cfe/trunk/test/OpenMP/target_device_messages.cpp<br> cfe/trunk/test/OpenMP/target_if_messages.cpp<br> cfe/trunk/test/OpenMP/target_messages.cpp<br> cfe/trunk/test/OpenMP/target_parallel_default_messages.cpp<br> cfe/trunk/test/OpenMP/target_parallel_device_messages.cpp<br> cfe/trunk/test/OpenMP/target_parallel_firstprivate_messages.cpp<br> cfe/trunk/test/OpenMP/target_parallel_if_messages.cpp<br> cfe/trunk/test/OpenMP/target_parallel_map_messages.cpp<br> cfe/trunk/test/OpenMP/target_parallel_messages.cpp<br> cfe/trunk/test/OpenMP/target_parallel_num_threads_messages.cpp<br> cfe/trunk/test/OpenMP/target_parallel_private_messages.cpp<br> cfe/trunk/test/OpenMP/target_parallel_proc_bind_messages.cpp<br> cfe/trunk/test/OpenMP/target_parallel_reduction_messages.cpp<br> cfe/trunk/test/OpenMP/target_parallel_shared_messages.cpp<br> cfe/trunk/test/OpenMP/target_private_messages.cpp<br> cfe/trunk/test/OpenMP/teams_reduction_messages.cpp<br><br>Modified: cfe/trunk/include/clang/Basic/OpenMPKinds.h<br>URL: </font><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/OpenMPKinds.h?rev=259366&r1=259365&r2=259366&view=diff" target="_blank"><u><font size="4" color="#0000FF">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/OpenMPKinds.h?rev=259366&r1=259365&r2=259366&view=diff</font></u></a><font size="4"><br>==============================================================================<br>--- cfe/trunk/include/clang/Basic/OpenMPKinds.h (original)<br>+++ cfe/trunk/include/clang/Basic/OpenMPKinds.h Mon Feb 1 10:32:47 2016<br>@@ -156,11 +156,20 @@ bool isOpenMPTaskLoopDirective(OpenMPDir<br> /// parallel', otherwise - false.<br> bool isOpenMPParallelDirective(OpenMPDirectiveKind DKind);<br><br>-/// \brief Checks if the specified directive is a target-kind directive.<br>+/// \brief Checks if the specified directive is a target code offload directive.<br> /// \param DKind Specified directive.<br>-/// \return true - the directive is a target-like directive like 'omp target',<br>+/// \return true - the directive is a target code offload directive like<br>+/// 'omp target', 'omp target parallel', 'omp target xxx'<br> /// otherwise - false.<br>-bool isOpenMPTargetDirective(OpenMPDirectiveKind DKind);<br>+bool isOpenMPTargetExecutionDirective(OpenMPDirectiveKind DKind);<br>+<br>+/// \brief Checks if the specified directive is a target data offload directive.<br>+/// \param DKind Specified directive.<br>+/// \return true - the directive is a target data offload directive like<br>+/// 'omp target data', 'omp target update', 'omp target enter data',<br>+/// 'omp target exit data'<br>+/// otherwise - false.<br>+bool isOpenMPTargetDataManagementDirective(OpenMPDirectiveKind DKind);<br><br> /// \brief Checks if the specified directive is a teams-kind directive.<br> /// \param DKind Specified directive.<br><br>Modified: cfe/trunk/lib/Basic/OpenMPKinds.cpp<br>URL: </font><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/OpenMPKinds.cpp?rev=259366&r1=259365&r2=259366&view=diff" target="_blank"><u><font size="4" color="#0000FF">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/OpenMPKinds.cpp?rev=259366&r1=259365&r2=259366&view=diff</font></u></a><font size="4"><br>==============================================================================<br>--- cfe/trunk/lib/Basic/OpenMPKinds.cpp (original)<br>+++ cfe/trunk/lib/Basic/OpenMPKinds.cpp Mon Feb 1 10:32:47 2016<br>@@ -576,8 +576,15 @@ bool clang::isOpenMPParallelDirective(Op<br> // TODO add next directives.<br> }<br><br>-bool clang::isOpenMPTargetDirective(OpenMPDirectiveKind DKind) {<br>- return DKind == OMPD_target; // TODO add next directives.<br>+bool clang::isOpenMPTargetExecutionDirective(OpenMPDirectiveKind DKind) {<br>+ // TODO add next directives.<br>+ return DKind == OMPD_target || DKind == OMPD_target_parallel;<br>+}<br>+<br>+bool clang::isOpenMPTargetDataManagementDirective(OpenMPDirectiveKind DKind) {<br>+ // TODO add target update directive check.<br>+ return DKind == OMPD_target_data || DKind == OMPD_target_enter_data ||<br>+ DKind == OMPD_target_exit_data;<br> }<br><br> bool clang::isOpenMPTeamsDirective(OpenMPDirectiveKind DKind) {<br><br>Modified: cfe/trunk/lib/Sema/SemaOpenMP.cpp<br>URL: </font><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaOpenMP.cpp?rev=259366&r1=259365&r2=259366&view=diff" target="_blank"><u><font size="4" color="#0000FF">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaOpenMP.cpp?rev=259366&r1=259365&r2=259366&view=diff</font></u></a><font size="4"><br>==============================================================================<br>--- cfe/trunk/lib/Sema/SemaOpenMP.cpp (original)<br>+++ cfe/trunk/lib/Sema/SemaOpenMP.cpp Mon Feb 1 10:32:47 2016<br>@@ -809,7 +809,7 @@ bool Sema::IsOpenMPCapturedByRef(ValueDe<br> auto DKind = DSAStack->getDirectiveForScope(RSI->TheScope);<br> auto Ty = D->getType();<br><br>- if (isOpenMPTargetDirective(DKind)) {<br>+ if (isOpenMPTargetExecutionDirective(DKind)) {<br> // This table summarizes how a given variable should be passed to the device<br> // given its type and the clauses where it appears. This table is based on<br> // the description in OpenMP 4.5 [2.10.4, target Construct] and<br>@@ -907,7 +907,7 @@ bool Sema::IsOpenMPCapturedDecl(ValueDec<br> DSAStack->hasDirective(<br> [](OpenMPDirectiveKind K, const DeclarationNameInfo &DNI,<br> SourceLocation Loc) -> bool {<br>- return isOpenMPTargetDirective(K);<br>+ return isOpenMPTargetExecutionDirective(K);<br> },<br> false)) {<br> return true;<br>@@ -944,7 +944,8 @@ bool Sema::isOpenMPTargetCapturedDecl(Va<br><br> auto *VD = dyn_cast<VarDecl>(D);<br> return VD && !VD->hasLocalStorage() &&<br>- DSAStack->hasExplicitDirective(isOpenMPTargetDirective, Level);<br>+ DSAStack->hasExplicitDirective(isOpenMPTargetExecutionDirective,<br>+ Level);<br> }<br><br> void Sema::DestroyDataSharingAttributesStack() { delete DSAStack; }<br>@@ -2313,11 +2314,11 @@ static bool CheckNestingOfRegions(Sema &<br> // | target | flush | * |<br> // | target | ordered | * |<br> // | target | atomic | * |<br>- // | target | target | * |<br>- // | target | target parallel | * |<br>- // | target | target enter | * |<br>+ // | target | target | |<br>+ // | target | target parallel | |<br>+ // | target | target enter | |<br> // | | data | |<br>- // | target | target exit | * |<br>+ // | target | target exit | |<br> // | | data | |<br> // | target | teams | * |<br> // | target | cancellation | |<br>@@ -2347,11 +2348,11 @@ static bool CheckNestingOfRegions(Sema &<br> // | target parallel | flush | * |<br> // | target parallel | ordered | * |<br> // | target parallel | atomic | * |<br>- // | target parallel | target | * |<br>- // | target parallel | target parallel | * |<br>- // | target parallel | target enter | * |<br>+ // | target parallel | target | |<br>+ // | target parallel | target parallel | |<br>+ // | target parallel | target enter | |<br> // | | data | |<br>- // | target parallel | target exit | * |<br>+ // | target parallel | target exit | |<br> // | | data | |<br> // | target parallel | teams | |<br> // | target parallel | cancellation | |<br>@@ -2498,6 +2499,7 @@ static bool CheckNestingOfRegions(Sema &<br> // +------------------+-----------------+------------------------------------+<br> if (Stack->getCurScope()) {<br> auto ParentRegion = Stack->getParentDirective();<br>+ auto OffendingRegion = ParentRegion;<br> bool NestingProhibited = false;<br> bool CloseNesting = true;<br> enum {<br>@@ -2658,10 +2660,32 @@ static bool CheckNestingOfRegions(Sema &<br> NestingProhibited = !isOpenMPTeamsDirective(ParentRegion);<br> Recommend = ShouldBeInTeamsRegion;<br> }<br>+ if (!NestingProhibited &&<br>+ (isOpenMPTargetExecutionDirective(CurrentRegion) ||<br>+ isOpenMPTargetDataManagementDirective(CurrentRegion))) {<br>+ // OpenMP 4.5 [2.17 Nesting of Regions]<br>+ // If a target, target update, target data, target enter data, or<br>+ // target exit data construct is encountered during execution of a<br>+ // target region, the behavior is unspecified.<br>+ OpenMPDirectiveKind PreviousTargetExecutionDirective;<br>+ NestingProhibited = Stack->hasDirective(<br>+ [&PreviousTargetExecutionDirective](OpenMPDirectiveKind K,<br>+ const DeclarationNameInfo &DNI,<br>+ SourceLocation Loc) -> bool {<br>+ if (isOpenMPTargetExecutionDirective(K)) {<br>+ PreviousTargetExecutionDirective = K;<br>+ return true;<br>+ } else<br>+ return false;<br>+ },<br>+ false /* don't skip top directive */);<br>+ CloseNesting = false;<br>+ OffendingRegion = PreviousTargetExecutionDirective;<br>+ }<br> if (NestingProhibited) {<br> SemaRef.Diag(StartLoc, diag::err_omp_prohibited_region)<br>- << CloseNesting << getOpenMPDirectiveName(ParentRegion) << Recommend<br>- << getOpenMPDirectiveName(CurrentRegion);<br>+ << CloseNesting << getOpenMPDirectiveName(OffendingRegion)<br>+ << Recommend << getOpenMPDirectiveName(CurrentRegion);<br> return true;<br> }<br> }<br><br>Modified: cfe/trunk/test/OpenMP/distribute_private_messages.cpp<br>URL: </font><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_private_messages.cpp?rev=259366&r1=259365&r2=259366&view=diff" target="_blank"><u><font size="4" color="#0000FF">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/distribute_private_messages.cpp?rev=259366&r1=259365&r2=259366&view=diff</font></u></a><font size="4"><br>==============================================================================<br>--- cfe/trunk/test/OpenMP/distribute_private_messages.cpp (original)<br>+++ cfe/trunk/test/OpenMP/distribute_private_messages.cpp Mon Feb 1 10:32:47 2016<br>@@ -98,6 +98,7 @@ int main(int argc, char **argv) {<br> #pragma omp target<br> #pragma omp teams firstprivate(i)<br> #pragma omp parallel private(i)<br>+ {}<br> #pragma omp target<br> #pragma omp teams reduction(+:i)<br> #pragma omp distribute private(i)<br>@@ -113,20 +114,20 @@ int main(int argc, char **argv) {<br> #pragma omp teams<br> #pragma omp distribute firstprivate(i)<br> for (int k = 0; k < 10; ++k) {<br>- #pragma omp target<br>- #pragma omp teams firstprivate(i)<br>- #pragma omp distribute private(i)<br>- for (int x = 0; x < 10; ++x) foo();<br> }<br> #pragma omp target<br>+ #pragma omp teams firstprivate(i)<br>+ #pragma omp distribute private(i)<br>+ for (int x = 0; x < 10; ++x) foo();<br>+ #pragma omp target<br> #pragma omp teams reduction(+:i)<br> #pragma omp distribute<br> for (int k = 0; k < 10; ++k) {<br>- #pragma omp target<br>- #pragma omp teams reduction(+:i)<br>- #pragma omp distribute private(i)<br>- for (int x = 0; x < 10; ++x) foo();<br> }<br>+ #pragma omp target<br>+ #pragma omp teams reduction(+:i)<br>+ #pragma omp distribute private(i)<br>+ for (int x = 0; x < 10; ++x) foo();<br><br> return 0;<br> }<br><br>Modified: cfe/trunk/test/OpenMP/nesting_of_regions.cpp<br>URL: </font><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/nesting_of_regions.cpp?rev=259366&r1=259365&r2=259366&view=diff" target="_blank"><u><font size="4" color="#0000FF">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/nesting_of_regions.cpp?rev=259366&r1=259365&r2=259366&view=diff</font></u></a><font size="4"><br>==============================================================================<br>--- cfe/trunk/test/OpenMP/nesting_of_regions.cpp (original)<br>+++ cfe/trunk/test/OpenMP/nesting_of_regions.cpp Mon Feb 1 10:32:47 2016<br>@@ -2666,12 +2666,12 @@ void foo() {<br> }<br> #pragma omp target<br> {<br>-#pragma omp target<br>+#pragma omp target // expected-error {{region cannot be nested inside 'target' region}}<br> ++a;<br> }<br> #pragma omp target<br> {<br>-#pragma omp target parallel<br>+#pragma omp target parallel // expected-error {{region cannot be nested inside 'target' region}}<br> ++a;<br> }<br> #pragma omp target<br>@@ -2699,11 +2699,11 @@ void foo() {<br> }<br> #pragma omp target<br> {<br>-#pragma omp target enter data map(to: a)<br>+#pragma omp target enter data map(to: a) // expected-error {{region cannot be nested inside 'target' region}}<br> }<br> #pragma omp target<br> {<br>-#pragma omp target exit data map(from: a)<br>+#pragma omp target exit data map(from: a) // expected-error {{region cannot be nested inside 'target' region}}<br> }<br><br> // TARGET PARALLEL DIRECTIVE<br>@@ -2796,12 +2796,12 @@ void foo() {<br> }<br> #pragma omp target parallel<br> {<br>-#pragma omp target<br>+#pragma omp target // expected-error {{region cannot be nested inside 'target parallel' region}}<br> ++a;<br> }<br> #pragma omp target parallel<br> {<br>-#pragma omp target parallel<br>+#pragma omp target parallel // expected-error {{region cannot be nested inside 'target parallel' region}}<br> ++a;<br> }<br> #pragma omp target parallel<br>@@ -2829,11 +2829,11 @@ void foo() {<br> }<br> #pragma omp target parallel<br> {<br>-#pragma omp target enter data map(to: a)<br>+#pragma omp target enter data map(to: a) // expected-error {{region cannot be nested inside 'target parallel' region}}<br> }<br> #pragma omp target parallel<br> {<br>-#pragma omp target exit data map(from: a)<br>+#pragma omp target exit data map(from: a) // expected-error {{region cannot be nested inside 'target parallel' region}}<br> }<br><br> // TEAMS DIRECTIVE<br>@@ -2952,7 +2952,7 @@ void foo() {<br> #pragma omp target<br> #pragma omp teams<br> {<br>-#pragma omp target parallel<br>+#pragma omp target parallel // expected-error {{region cannot be nested inside 'target' region}}<br> ++a;<br> }<br> #pragma omp target<br>@@ -3337,28 +3337,28 @@ void foo() {<br> #pragma omp teams<br> #pragma omp distribute<br> for (int i = 0; i < 10; ++i) {<br>-#pragma omp target<br>+#pragma omp target // expected-error {{region cannot be nested inside 'target' region}}<br> ++a;<br> }<br> #pragma omp target<br> #pragma omp teams<br> #pragma omp distribute<br> for (int i = 0; i < 10; ++i) {<br>-#pragma omp target parallel<br>+#pragma omp target parallel // expected-error {{region cannot be nested inside 'target' region}}<br> ++a;<br> }<br> #pragma omp target<br> #pragma omp teams<br> #pragma omp distribute<br> for (int i = 0; i < 10; ++i) {<br>-#pragma omp target enter data map(to: a)<br>+#pragma omp target enter data map(to: a) // expected-error {{region cannot be nested inside 'target' region}}<br> ++a;<br> }<br> #pragma omp target<br> #pragma omp teams<br> #pragma omp distribute<br> for (int i = 0; i < 10; ++i) {<br>-#pragma omp target exit data map(from: a)<br>+#pragma omp target exit data map(from: a) // expected-error {{region cannot be nested inside 'target' region}}<br> ++a;<br> }<br> #pragma omp target<br>@@ -5807,21 +5807,21 @@ void foo() {<br> }<br> #pragma omp target<br> {<br>-#pragma omp target<br>+#pragma omp target // expected-error {{region cannot be nested inside 'target' region}}<br> ++a;<br> }<br> #pragma omp target<br> {<br>-#pragma omp target parallel<br>+#pragma omp target parallel // expected-error {{region cannot be nested inside 'target' region}}<br> ++a;<br> }<br> #pragma omp target<br> {<br>-#pragma omp target enter data map(to: a)<br>+#pragma omp target enter data map(to: a) // expected-error {{region cannot be nested inside 'target' region}}<br> }<br> #pragma omp target<br> {<br>-#pragma omp target exit data map(from: a)<br>+#pragma omp target exit data map(from: a) // expected-error {{region cannot be nested inside 'target' region}}<br> }<br> #pragma omp target<br> {<br>@@ -5937,12 +5937,12 @@ void foo() {<br> }<br> #pragma omp target parallel<br> {<br>-#pragma omp target<br>+#pragma omp target // expected-error {{region cannot be nested inside 'target parallel' region}}<br> ++a;<br> }<br> #pragma omp target parallel<br> {<br>-#pragma omp target parallel<br>+#pragma omp target parallel // expected-error {{region cannot be nested inside 'target parallel' region}}<br> ++a;<br> }<br> #pragma omp target parallel<br>@@ -5970,11 +5970,11 @@ void foo() {<br> }<br> #pragma omp target parallel<br> {<br>-#pragma omp target enter data map(to: a)<br>+#pragma omp target enter data map(to: a) // expected-error {{region cannot be nested inside 'target parallel' region}}<br> }<br> #pragma omp target parallel<br> {<br>-#pragma omp target exit data map(from: a)<br>+#pragma omp target exit data map(from: a) // expected-error {{region cannot be nested inside 'target parallel' region}}<br> }<br><br> // TEAMS DIRECTIVE<br>@@ -6093,7 +6093,7 @@ void foo() {<br> #pragma omp target<br> #pragma omp teams<br> {<br>-#pragma omp target parallel<br>+#pragma omp target parallel // expected-error {{region cannot be nested inside 'target' region}}<br> ++a;<br> }<br> #pragma omp target<br>@@ -6477,14 +6477,14 @@ void foo() {<br> #pragma omp teams<br> #pragma omp distribute<br> for (int i = 0; i < 10; ++i) {<br>-#pragma omp target<br>+#pragma omp target // expected-error {{region cannot be nested inside 'target' region}}<br> ++a;<br> }<br> #pragma omp target<br> #pragma omp teams<br> #pragma omp distribute<br> for (int i = 0; i < 10; ++i) {<br>-#pragma omp target parallel<br>+#pragma omp target parallel // expected-error {{region cannot be nested inside 'target' region}}<br> ++a;<br> }<br> #pragma omp target<br>@@ -6499,14 +6499,14 @@ void foo() {<br> #pragma omp teams<br> #pragma omp distribute<br> for (int i = 0; i < 10; ++i) {<br>-#pragma omp target enter data map(to: a)<br>+#pragma omp target enter data map(to: a) // expected-error {{region cannot be nested inside 'target' region}}<br> ++a;<br> }<br> #pragma omp target<br> #pragma omp teams<br> #pragma omp distribute<br> for (int i = 0; i < 10; ++i) {<br>-#pragma omp target exit data map(from: a)<br>+#pragma omp target exit data map(from: a) // expected-error {{region cannot be nested inside 'target' region}}<br> ++a;<br> }<br> }<br><br>Modified: cfe/trunk/test/OpenMP/target_data_device_messages.cpp<br>URL: </font><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_data_device_messages.cpp?rev=259366&r1=259365&r2=259366&view=diff" target="_blank"><u><font size="4" color="#0000FF">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_data_device_messages.cpp?rev=259366&r1=259365&r2=259366&view=diff</font></u></a><font size="4"><br>==============================================================================<br>--- cfe/trunk/test/OpenMP/target_data_device_messages.cpp (original)<br>+++ cfe/trunk/test/OpenMP/target_data_device_messages.cpp Mon Feb 1 10:32:47 2016<br>@@ -21,8 +21,8 @@ int main(int argc, char **argv) {<br> #pragma omp target data map(to: a) device (argc), device (argc+1) // expected-error {{directive '#pragma omp target data' cannot contain more than one 'device' clause}}<br> #pragma omp target data map(to: a) device (S1) // expected-error {{'S1' does not refer to a value}}<br> #pragma omp target data map(to: a) device (-2) // expected-error {{argument to 'device' clause must be a non-negative integer value}}<br>- #pragma omp target map(to: a) device (-10u)<br>- #pragma omp target map(to: a) device (3.14) // expected-error {{expression must have integral or unscoped enumeration type, not 'double'}}<br>+ #pragma omp target data map(to: a) device (-10u)<br>+ #pragma omp target data map(to: a) device (3.14) // expected-error {{expression must have integral or unscoped enumeration type, not 'double'}}<br> foo();<br><br> return 0;<br><br>Modified: cfe/trunk/test/OpenMP/target_device_messages.cpp<br>URL: </font><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_device_messages.cpp?rev=259366&r1=259365&r2=259366&view=diff" target="_blank"><u><font size="4" color="#0000FF">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_device_messages.cpp?rev=259366&r1=259365&r2=259366&view=diff</font></u></a><font size="4"><br>==============================================================================<br>--- cfe/trunk/test/OpenMP/target_device_messages.cpp (original)<br>+++ cfe/trunk/test/OpenMP/target_device_messages.cpp Mon Feb 1 10:32:47 2016<br>@@ -11,16 +11,27 @@ struct S1; // expected-note {{declared h<br><br> int main(int argc, char **argv) {<br> #pragma omp target device // expected-error {{expected '(' after 'device'}}<br>+ foo();<br> #pragma omp target device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+ foo();<br> #pragma omp target device () // expected-error {{expected expression}}<br>+ foo();<br> #pragma omp target device (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+ foo();<br> #pragma omp target device (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target' are ignored}}<br>-#pragma omp target device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}<br>+ foo();<br>+ #pragma omp target device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}<br>+ foo();<br> #pragma omp target device (argc + argc)<br>+ foo();<br> #pragma omp target device (argc), device (argc+1) // expected-error {{directive '#pragma omp target' cannot contain more than one 'device' clause}}<br>+ foo();<br> #pragma omp target device (S1) // expected-error {{'S1' does not refer to a value}}<br>+ foo();<br> #pragma omp target device (-2) // expected-error {{argument to 'device' clause must be a non-negative integer value}}<br>+ foo();<br> #pragma omp target device (-10u)<br>+ foo();<br> #pragma omp target device (3.14) // expected-error {{expression must have integral or unscoped enumeration type, not 'double'}}<br> foo();<br><br><br>Modified: cfe/trunk/test/OpenMP/target_if_messages.cpp<br>URL: </font><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_if_messages.cpp?rev=259366&r1=259365&r2=259366&view=diff" target="_blank"><u><font size="4" color="#0000FF">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_if_messages.cpp?rev=259366&r1=259365&r2=259366&view=diff</font></u></a><font size="4"><br>==============================================================================<br>--- cfe/trunk/test/OpenMP/target_if_messages.cpp (original)<br>+++ cfe/trunk/test/OpenMP/target_if_messages.cpp Mon Feb 1 10:32:47 2016<br>@@ -12,21 +12,37 @@ struct S1; // expected-note {{declared h<br> template <class T, class S> // expected-note {{declared here}}<br> int tmain(T argc, S **argv) {<br> #pragma omp target if // expected-error {{expected '(' after 'if'}}<br>+ foo();<br> #pragma omp target if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+ foo();<br> #pragma omp target if () // expected-error {{expected expression}}<br>+ foo();<br> #pragma omp target if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+ foo();<br> #pragma omp target if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target' are ignored}}<br>+ foo();<br> #pragma omp target if (argc > 0 ? argv[1] : argv[2])<br>+ foo();<br> #pragma omp target if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp target' cannot contain more than one 'if' clause}}<br>+ foo();<br> #pragma omp target if (S) // expected-error {{'S' does not refer to a value}}<br>+ foo();<br> #pragma omp target if (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+ foo();<br> #pragma omp target if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+ foo();<br> #pragma omp target if(argc)<br>+ foo();<br> #pragma omp target if(target : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+ foo();<br> #pragma omp target if(target : argc // expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+ foo();<br> #pragma omp target if(target : argc)<br>+ foo();<br> #pragma omp target if(target : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp target'}}<br>+ foo();<br> #pragma omp target if(target : argc) if (target:argc) // expected-error {{directive '#pragma omp target' cannot contain more than one 'if' clause with 'target' name modifier}}<br>+ foo();<br> #pragma omp target if(target : argc) if (argc) // expected-error {{no more 'if' clause is allowed}} expected-note {{previous clause with directive name modifier specified here}}<br> foo();<br><br>@@ -35,22 +51,39 @@ int tmain(T argc, S **argv) {<br><br> int main(int argc, char **argv) {<br> #pragma omp target if // expected-error {{expected '(' after 'if'}}<br>+ foo();<br> #pragma omp target if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+ foo();<br> #pragma omp target if () // expected-error {{expected expression}}<br>+ foo();<br> #pragma omp target if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+ foo();<br> #pragma omp target if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target' are ignored}}<br>+ foo();<br> #pragma omp target if (argc > 0 ? argv[1] : argv[2])<br>+ foo();<br> #pragma omp target if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp target' cannot contain more than one 'if' clause}}<br>+ foo();<br> #pragma omp target if (S1) // expected-error {{'S1' does not refer to a value}}<br>+ foo();<br> #pragma omp target if (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+ foo();<br> #pragma omp target if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+ foo();<br> #pragma omp target if (1 0) // expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+ foo();<br> #pragma omp target if(if(tmain(argc, argv) // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+ foo();<br> #pragma omp target if(target : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+ foo();<br> #pragma omp target if(target : argc // expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+ foo();<br> #pragma omp target if(target : argc)<br>+ foo();<br> #pragma omp target if(target : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp target'}}<br>+ foo();<br> #pragma omp target if(target : argc) if (target:argc) // expected-error {{directive '#pragma omp target' cannot contain more than one 'if' clause with 'target' name modifier}}<br>+ foo();<br> #pragma omp target if(target : argc) if (argc) // expected-error {{no more 'if' clause is allowed}} expected-note {{previous clause with directive name modifier specified here}}<br> foo();<br><br><br>Modified: cfe/trunk/test/OpenMP/target_messages.cpp<br>URL: </font><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_messages.cpp?rev=259366&r1=259365&r2=259366&view=diff" target="_blank"><u><font size="4" color="#0000FF">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_messages.cpp?rev=259366&r1=259365&r2=259366&view=diff</font></u></a><font size="4"><br>==============================================================================<br>--- cfe/trunk/test/OpenMP/target_messages.cpp (original)<br>+++ cfe/trunk/test/OpenMP/target_messages.cpp Mon Feb 1 10:32:47 2016<br>@@ -21,6 +21,7 @@ int main(int argc, char **argv) {<br> #pragma omp target } // expected-warning {{extra tokens at the end of '#pragma omp target' are ignored}}<br> foo();<br> #pragma omp target</font><br><font size="4">+ foo();<br> // expected-warning@+1 {{extra tokens at the end of '#pragma omp target' are ignored}}<br> #pragma omp target unknown()<br> foo();<br><br>Modified: cfe/trunk/test/OpenMP/target_parallel_default_messages.cpp<br>URL: </font><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_default_messages.cpp?rev=259366&r1=259365&r2=259366&view=diff" target="_blank"><u><font size="4" color="#0000FF">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_default_messages.cpp?rev=259366&r1=259365&r2=259366&view=diff</font></u></a><font size="4"><br>==============================================================================<br>--- cfe/trunk/test/OpenMP/target_parallel_default_messages.cpp (original)<br>+++ cfe/trunk/test/OpenMP/target_parallel_default_messages.cpp Mon Feb 1 10:32:47 2016<br>@@ -4,10 +4,15 @@ void foo();<br><br> int main(int argc, char **argv) {<br> #pragma omp target parallel default // expected-error {{expected '(' after 'default'}}<br>+ foo();<br> #pragma omp target parallel default ( // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}} expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+ foo();<br> #pragma omp target parallel default () // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}}<br>+ foo();<br> #pragma omp target parallel default (none // expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+ foo();<br> #pragma omp target parallel default (shared), default(shared) // expected-error {{directive '#pragma omp target parallel' cannot contain more than one 'default' clause}}<br>+ foo();<br> #pragma omp target parallel default (x) // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}}<br> foo();<br><br>@@ -15,6 +20,7 @@ int main(int argc, char **argv) {<br> ++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}<br><br> #pragma omp target parallel default(none)<br>+ foo();<br> #pragma omp target parallel default(shared)<br> ++argc;<br> return 0;<br><br>Modified: cfe/trunk/test/OpenMP/target_parallel_device_messages.cpp<br>URL: </font><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_device_messages.cpp?rev=259366&r1=259365&r2=259366&view=diff" target="_blank"><u><font size="4" color="#0000FF">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_device_messages.cpp?rev=259366&r1=259365&r2=259366&view=diff</font></u></a><font size="4"><br>==============================================================================<br>--- cfe/trunk/test/OpenMP/target_parallel_device_messages.cpp (original)<br>+++ cfe/trunk/test/OpenMP/target_parallel_device_messages.cpp Mon Feb 1 10:32:47 2016<br>@@ -11,16 +11,27 @@ struct S1; // expected-note {{declared h<br><br> int main(int argc, char **argv) {<br> #pragma omp target parallel device // expected-error {{expected '(' after 'device'}}<br>+ foo();<br> #pragma omp target parallel device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+ foo();<br> #pragma omp target parallel device () // expected-error {{expected expression}}<br>+ foo();<br> #pragma omp target parallel device (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+ foo();<br> #pragma omp target parallel device (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel' are ignored}}<br>-#pragma omp target parallel device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}<br>+ foo();<br>+ #pragma omp target parallel device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}<br>+ foo();<br> #pragma omp target parallel device (argc + argc)<br>+ foo();<br> #pragma omp target parallel device (argc), device (argc+1) // expected-error {{directive '#pragma omp target parallel' cannot contain more than one 'device' clause}}<br>+ foo();<br> #pragma omp target parallel device (S1) // expected-error {{'S1' does not refer to a value}}<br>+ foo();<br> #pragma omp target parallel device (-2) // expected-error {{argument to 'device' clause must be a non-negative integer value}}<br>+ foo();<br> #pragma omp target parallel device (-10u)<br>+ foo();<br> #pragma omp target parallel device (3.14) // expected-error {{expression must have integral or unscoped enumeration type, not 'double'}}<br> foo();<br><br><br>Modified: cfe/trunk/test/OpenMP/target_parallel_firstprivate_messages.cpp<br>URL: </font><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_firstprivate_messages.cpp?rev=259366&r1=259365&r2=259366&view=diff" target="_blank"><u><font size="4" color="#0000FF">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_firstprivate_messages.cpp?rev=259366&r1=259365&r2=259366&view=diff</font></u></a><font size="4"><br>==============================================================================<br>--- cfe/trunk/test/OpenMP/target_parallel_firstprivate_messages.cpp (original)<br>+++ cfe/trunk/test/OpenMP/target_parallel_firstprivate_messages.cpp Mon Feb 1 10:32:47 2016<br>@@ -64,27 +64,47 @@ int main(int argc, char **argv) {<br> int &j = i;<br> static int m;<br> #pragma omp target parallel firstprivate // expected-error {{expected '(' after 'firstprivate'}}<br>+ foo();<br> #pragma omp target parallel firstprivate ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+ foo();<br> #pragma omp target parallel firstprivate () // expected-error {{expected expression}}<br>+ foo();<br> #pragma omp target parallel firstprivate (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+ foo();<br> #pragma omp target parallel firstprivate (argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+ foo();<br> #pragma omp target parallel firstprivate (argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}<br>+ foo();<br> #pragma omp target parallel firstprivate (argc)<br>+ foo();<br> #pragma omp target parallel firstprivate (S1) // expected-error {{'S1' does not refer to a value}}<br>+ foo();<br> #pragma omp target parallel firstprivate (a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}}<br>+ foo();<br> #pragma omp target parallel firstprivate (argv[1]) // expected-error {{expected variable name}}<br>+ foo();<br> #pragma omp target parallel firstprivate(ba)<br>+ foo();<br> #pragma omp target parallel firstprivate(ca)<br>+ foo();<br> #pragma omp target parallel firstprivate(da)<br>+ foo();<br> #pragma omp target parallel firstprivate(S2::S2s)<br>+ foo();<br> #pragma omp target parallel firstprivate(S2::S2sc)<br>+ foo();<br> #pragma omp target parallel firstprivate(e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{calling a private constructor of class 'S5'}}<br>+ foo();<br> #pragma omp target parallel firstprivate(h, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be firstprivate}}<br>+ foo();<br> #pragma omp target parallel private(i), firstprivate(i) // expected-error {{private variable cannot be firstprivate}} expected-note{{defined as private}}<br> foo();<br> #pragma omp target parallel shared(i)<br>+ foo();<br> #pragma omp target parallel firstprivate(i)<br>+ foo();<br> #pragma omp target parallel firstprivate(j)<br>+ foo();<br> #pragma omp target parallel firstprivate(m)<br> foo();<br><br><br>Modified: cfe/trunk/test/OpenMP/target_parallel_if_messages.cpp<br>URL: </font><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_if_messages.cpp?rev=259366&r1=259365&r2=259366&view=diff" target="_blank"><u><font size="4" color="#0000FF">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_if_messages.cpp?rev=259366&r1=259365&r2
=259366&view=diff</font></u></a><font size="4"><br>==============================================================================<br>--- cfe/trunk/test/OpenMP/target_parallel_if_messages.cpp (original)<br>+++ cfe/trunk/test/OpenMP/target_parallel_if_messages.cpp Mon Feb 1 10:32:47 2016<br>@@ -12,25 +12,45 @@ struct S1; // expected-note {{declared h<br> template <class T, class S> // expected-note {{declared here}}<br> int tmain(T argc, S **argv) {<br> #pragma omp target parallel if // expected-error {{expected '(' after 'if'}}<br>+ foo();<br> #pragma omp target parallel if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+ foo();<br> #pragma omp target parallel if () // expected-error {{expected expression}}<br>+ foo();<br> #pragma omp target parallel if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+ foo();<br> #pragma omp target parallel if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel' are ignored}}<br>+ foo();<br> #pragma omp target parallel if (argc > 0 ? argv[1] : argv[2])<br>+ foo();<br> #pragma omp target parallel if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp target parallel' cannot contain more than one 'if' clause}}<br>+ foo();<br> #pragma omp target parallel if (S) // expected-error {{'S' does not refer to a value}}<br>+ foo();<br> #pragma omp target parallel if (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+ foo();<br> #pragma omp target parallel if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+ foo();<br> #pragma omp target parallel if(argc)<br>+ foo();<br> #pragma omp target parallel if(target : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+ foo();<br> #pragma omp target parallel if(parallel : argc // expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+ foo();<br> #pragma omp target parallel if(target : argc)<br>+ foo();<br> #pragma omp target parallel if(parallel : argc)<br>+ foo();<br> #pragma omp target parallel if(target : argc) if(parallel : argc)<br>+ foo();<br> #pragma omp target parallel if(parallel : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp target parallel'}}<br>+ foo();<br> #pragma omp target parallel if(target : argc) if (target :argc) // expected-error {{directive '#pragma omp target parallel' cannot contain more than one 'if' clause with 'target' name modifier}}<br>+ foo();<br> #pragma omp target parallel if(parallel : argc) if (parallel :argc) // expected-error {{directive '#pragma omp target parallel' cannot contain more than one 'if' clause with 'parallel' name modifier}}<br>+ foo();<br> #pragma omp target parallel if(target : argc) if (argc) // expected-error {{expected 'parallel' directive name modifier}} expected-note {{previous clause with directive name modifier specified here}}<br>+ foo();<br> #pragma omp target parallel if(target : argc) if(parallel : argc) if (argc) // expected-error {{no more 'if' clause is allowed}} expected-note {{previous clause with directive name modifier specified here}} expected-note {{previous clause with directive name modifier specified here}}<br> foo();<br><br>@@ -39,24 +59,43 @@ int tmain(T argc, S **argv) {<br><br> int main(int argc, char **argv) {<br> #pragma omp target parallel if // expected-error {{expected '(' after 'if'}}<br>+ foo();<br> #pragma omp target parallel if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+ foo();<br> #pragma omp target parallel if () // expected-error {{expected expression}}<br>+ foo();<br> #pragma omp target parallel if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+ foo();<br> #pragma omp target parallel if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel' are ignored}}<br>+ foo();<br> #pragma omp target parallel if (argc > 0 ? argv[1] : argv[2])<br>+ foo();<br> #pragma omp target parallel if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp target parallel' cannot contain more than one 'if' clause}}<br>+ foo();<br> #pragma omp target parallel if (S1) // expected-error {{'S1' does not refer to a value}}<br>+ foo();<br> #pragma omp target parallel if (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+ foo();<br> #pragma omp target parallel if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+ foo();<br> #pragma omp target parallel if (1 0) // expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+ foo();<br> #pragma omp target parallel if(if(tmain(argc, argv) // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+ foo();<br> #pragma omp target parallel if(target : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+ foo();<br> #pragma omp target parallel if(parallel : argc // expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+ foo();<br> #pragma omp target parallel if(parallel : argc)<br>+ foo();<br> #pragma omp target parallel if(target : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp target parallel'}}<br>+ foo();<br> #pragma omp target parallel if(target : argc) if (target :argc) // expected-error {{directive '#pragma omp target parallel' cannot contain more than one 'if' clause with 'target' name modifier}}<br>+ foo();<br> #pragma omp target parallel if(parallel : argc) if (parallel :argc) // expected-error {{directive '#pragma omp target parallel' cannot contain more than one 'if' clause with 'parallel' name modifier}}<br>+ foo();<br> #pragma omp target parallel if(target : argc) if (argc) // expected-error {{expected 'parallel' directive name modifier}} expected-note {{previous clause with directive name modifier specified here}}<br>+ foo();<br> #pragma omp target parallel if(target : argc) if(parallel : argc) if (argc) // expected-error {{no more 'if' clause is allowed}} expected-note {{previous clause with directive name modifier specified here}} expected-note {{previous clause with directive name modifier specified here}}<br> foo();<br><br><br>Modified: cfe/trunk/test/OpenMP/target_parallel_map_messages.cpp<br>URL: </font><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_map_messages.cpp?rev=259366&r1=259365&r2=259366&view=diff" target="_blank"><u><font size="4" color="#0000FF">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_map_messages.cpp?rev=259366&r1=259365&r2=259366&view=diff</font></u></a><font size="4"><br>==============================================================================<br>--- cfe/trunk/test/OpenMP/target_parallel_map_messages.cpp (original)<br>+++ cfe/trunk/test/OpenMP/target_parallel_map_messages.cpp Mon Feb 1 10:32:47 2016<br>@@ -65,13 +65,21 @@ T tmain(T argc) {<br><br><br> #pragma omp target parallel map // expected-error {{expected '(' after 'map'}}<br>+ foo();<br> #pragma omp target parallel map( // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{expected expression}}<br>+ foo();<br> #pragma omp target parallel map() // expected-error {{expected expression}}<br>+ foo();<br> #pragma omp target parallel map(alloc) // expected-error {{use of undeclared identifier 'alloc'}}<br>+ foo();<br> #pragma omp target parallel map(to argc // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{expected ',' or ')' in 'map' clause}}<br>+ foo();<br> #pragma omp target parallel map(to:) // expected-error {{expected expression}}<br>+ foo();<br> #pragma omp target parallel map(from: argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+ foo();<br> #pragma omp target parallel map(x: y) // expected-error {{incorrect map type, expected one of 'to', 'from', 'tofrom', 'alloc', 'release', or 'delete'}}<br>+ foo();<br> #pragma omp target parallel map(x)<br> foo();<br> #pragma omp target parallel map(tofrom: t[:I])<br>@@ -97,38 +105,62 @@ T tmain(T argc) {<br> #pragma omp target parallel map(to, x)<br> foo();<br> #pragma omp target parallel map(to x) // expected-error {{expected ',' or ')' in 'map' clause}}<br>+ foo();<br> #pragma omp target parallel map(tofrom: argc > 0 ? x : y) // expected-error 2 {{expected expression containing only member accesses and/or array sections based on named variables}}<br>+ foo();<br> #pragma omp target parallel map(argc)<br>+ foo();<br> #pragma omp target parallel map(S1) // expected-error {{'S1' does not refer to a value}}<br>+ foo();<br> #pragma omp target parallel map(a, b, c, d, f) // expected-error {{incomplete type 'S1' where a complete type is required}} expected-error 2 {{type 'S2' is not mappable to target}}<br>+ foo();<br> #pragma omp target parallel map(ba) // expected-error 2 {{type 'S2' is not mappable to target}}<br>+ foo();<br> #pragma omp target parallel map(ca)<br>+ foo();<br> #pragma omp target parallel map(da)<br>+ foo();<br> #pragma omp target parallel map(S2::S2s)<br>+ foo();<br> #pragma omp target parallel map(S2::S2sc)<br>+ foo();<br> #pragma omp target parallel map(e, g)<br>+ foo();<br> #pragma omp target parallel map(h) // expected-error {{threadprivate variables are not allowed in map clause}}<br>+ foo();<br> #pragma omp target parallel map(k), map(k) // expected-error 2 {{variable already marked as mapped in current construct}} expected-note 2 {{used here}}<br>+ foo();<br> #pragma omp target parallel map(k), map(k[:5]) // expected-error 2 {{pointer cannot be mapped along with a section derived from itself}} expected-note 2 {{used here}}<br> foo();<br> #pragma omp target parallel map(da)<br>+ foo();<br> #pragma omp target parallel map(da[:4])<br> foo();<br>-#pragma omp target parallel map(k, j, l) // expected-note 2 {{used here}}<br>+#pragma omp target data map(k, j, l) // expected-note 2 {{used here}}<br> #pragma omp target parallel map(k[:4]) // expected-error 2 {{pointer cannot be mapped along with a section derived from itself}}<br>+ foo();<br> #pragma omp target parallel map(j)<br>+ foo();<br> #pragma omp target parallel map(l) map(l[:5]) // expected-error 2 {{variable already marked as mapped in current construct}} expected-note 2 {{used here}}<br> foo();<br>-#pragma omp target parallel map(k[:4], j, l[:5]) // expected-note 4 {{used here}}<br>+#pragma omp target data map(k[:4], j, l[:5]) // expected-note 4 {{used here}}<br>+{<br> #pragma omp target parallel map(k) // expected-error 2 {{pointer cannot be mapped along with a section derived from itself}}<br>+ foo();<br> #pragma omp target parallel map(j)<br>+ foo();<br> #pragma omp target parallel map(l) // expected-error 2 {{original storage of expression in data environment is shared but data environment do not fully contain mapped expression storage}}<br> foo();<br>+}<br><br> #pragma omp target parallel map(always, tofrom: x)<br>+ foo();<br> #pragma omp target parallel map(always: x) // expected-error {{missing map type}}<br>+ foo();<br> #pragma omp target parallel map(tofrom, always: x) // expected-error {{incorrect map type modifier, expected 'always'}} expected-error {{incorrect map type, expected one of 'to', 'from', 'tofrom', 'alloc', 'release', or 'delete'}}<br>+ foo();<br> #pragma omp target parallel map(always, tofrom: always, tofrom, x)<br>+ foo();<br> #pragma omp target parallel map(tofrom j) // expected-error {{expected ',' or ')' in 'map' clause}}<br> foo();<br><br>@@ -148,13 +180,21 @@ int main(int argc, char **argv) {<br> int to, tofrom, always;<br> const int (&l)[5] = da;<br> #pragma omp target parallel map // expected-error {{expected '(' after 'map'}}<br>+ foo();<br> #pragma omp target parallel map( // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{expected expression}}<br>+ foo();<br> #pragma omp target parallel map() // expected-error {{expected expression}}<br>+ foo();<br> #pragma omp target parallel map(alloc) // expected-error {{use of undeclared identifier 'alloc'}}<br>+ foo();<br> #pragma omp target parallel map(to argc // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{expected ',' or ')' in 'map' clause}}<br>+ foo();<br> #pragma omp target parallel map(to:) // expected-error {{expected expression}}<br>+ foo();<br> #pragma omp target parallel map(from: argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+ foo();<br> #pragma omp target parallel map(x: y) // expected-error {{incorrect map type, expected one of 'to', 'from', 'tofrom', 'alloc', 'release', or 'delete'}}<br>+ foo();<br> #pragma omp target parallel map(x)<br> foo();<br> #pragma omp target parallel map(to: x)<br>@@ -166,39 +206,64 @@ int main(int argc, char **argv) {<br> #pragma omp target parallel map(to, x)<br> foo();<br> #pragma omp target parallel map(to x) // expected-error {{expected ',' or ')' in 'map' clause}}<br>+ foo();<br> #pragma omp target parallel map(tofrom: argc > 0 ? argv[1] : argv[2]) // expected-error {{expected expression containing only member accesses and/or array sections based on named variables}}<br>+ foo();<br> #pragma omp target parallel map(argc)<br>+ foo();<br> #pragma omp target parallel map(S1) // expected-error {{'S1' does not refer to a value}}<br>+ foo();<br> #pragma omp target parallel map(a, b, c, d, f) // expected-error {{incomplete type 'S1' where a complete type is required}} expected-error 2 {{type 'S2' is not mappable to target}}<br>+ foo();<br> #pragma omp target parallel map(argv[1])<br>+ foo();<br> #pragma omp target parallel map(ba) // expected-error 2 {{type 'S2' is not mappable to target}}<br>+ foo();<br> #pragma omp target parallel map(ca)<br>+ foo();<br> #pragma omp target parallel map(da)<br>+ foo();<br> #pragma omp target parallel map(S2::S2s)<br>+ foo();<br> #pragma omp target parallel map(S2::S2sc)<br>+ foo();<br> #pragma omp target parallel map(e, g)<br>+ foo();<br> #pragma omp target parallel map(h) // expected-error {{threadprivate variables are not allowed in map clause}}<br>+ foo();<br> #pragma omp target parallel map(k), map(k) // expected-error {{variable already marked as mapped in current construct}} expected-note {{used here}}<br>+ foo();<br> #pragma omp target parallel map(k), map(k[:5]) // expected-error {{pointer cannot be mapped along with a section derived from itself}} expected-note {{used here}}<br> foo();<br> #pragma omp target parallel map(da)<br>+ foo();<br> #pragma omp target parallel map(da[:4])<br> foo();<br>-#pragma omp target parallel map(k, j, l) // expected-note {{used here}}<br>+#pragma omp target data map(k, j, l) // expected-note {{used here}}<br> #pragma omp target parallel map(k[:4]) // expected-error {{pointer cannot be mapped along with a section derived from itself}}<br>+ foo();<br> #pragma omp target parallel map(j)<br>+ foo();<br> #pragma omp target parallel map(l) map(l[:5]) // expected-error 1 {{variable already marked as mapped in current construct}} expected-note 1 {{used here}}<br> foo();<br>-#pragma omp target parallel map(k[:4], j, l[:5]) // expected-note 2 {{used here}}<br>+#pragma omp target data map(k[:4], j, l[:5]) // expected-note 2 {{used here}}<br>+{<br> #pragma omp target parallel map(k) // expected-error {{pointer cannot be mapped along with a section derived from itself}}<br>+ foo();<br> #pragma omp target parallel map(j)<br>+ foo();<br> #pragma omp target parallel map(l) // expected-error {{original storage of expression in data environment is shared but data environment do not fully contain mapped expression storage}}<br> foo();<br>+}<br><br> #pragma omp target parallel map(always, tofrom: x)<br>+ foo();<br> #pragma omp target parallel map(always: x) // expected-error {{missing map type}}<br>+ foo();<br> #pragma omp target parallel map(tofrom, always: x) // expected-error {{incorrect map type modifier, expected 'always'}} expected-error {{incorrect map type, expected one of 'to', 'from', 'tofrom', 'alloc', 'release', or 'delete'}}<br>+ foo();<br> #pragma omp target parallel map(always, tofrom: always, tofrom, x)<br>+ foo();<br> #pragma omp target parallel map(tofrom j) // expected-error {{expected ',' or ')' in 'map' clause}}<br> foo();<br><br><br>Modified: cfe/trunk/test/OpenMP/target_parallel_messages.cpp<br>URL: </font><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_messages.cpp?rev=259366&r1=259365&r2=259366&view=diff" target="_blank"><u><font size="4" color="#0000FF">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_messages.cpp?rev=259366&r1=259365&r2=259366&view=diff</font></u></a><font size="4"><br>==============================================================================<br>--- cfe/trunk/test/OpenMP/target_parallel_messages.cpp (original)<br>+++ cfe/trunk/test/OpenMP/target_parallel_messages.cpp Mon Feb 1 10:32:47 2016<br>@@ -24,6 +24,7 @@ int main(int argc, char **argv) {<br> #pragma omp target parallel } // expected-warning {{extra tokens at the end of '#pragma omp target parallel' are ignored}}<br> foo();<br> #pragma omp target parallel<br>+ foo();<br> // expected-warning@+1 {{extra tokens at the end of '#pragma omp target parallel' are ignored}}<br> #pragma omp target parallel unknown()<br> foo();<br><br>Modified: cfe/trunk/test/OpenMP/target_parallel_num_threads_messages.cpp<br>URL: </font><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_num_threads_messages.cpp?rev=259366&r1=259365&r2=259366&view=diff" target="_blank"><u><font size="4" color="#0000FF">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_num_threads_messages.cpp?rev=259366&r1=259365&r2=259366&view=diff</font></u></a><font size="4"><br>==============================================================================<br>--- cfe/trunk/test/OpenMP/target_parallel_num_threads_messages.cpp (original)<br>+++ cfe/trunk/test/OpenMP/target_parallel_num_threads_messages.cpp Mon Feb 1 10:32:47 2016<br>@@ -14,16 +14,27 @@ struct S1; // expected-note {{declared h<br> template <class T, typename S, int N> // expected-note {{declared here}}<br> T tmain(T argc, S **argv) {<br> #pragma omp target parallel num_threads // expected-error {{expected '(' after 'num_threads'}}<br>+ foo();<br> #pragma omp target parallel num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+ foo();<br> #pragma omp target parallel num_threads () // expected-error {{expected expression}}<br>+ foo();<br> #pragma omp target parallel num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+ foo();<br> #pragma omp target parallel num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel' are ignored}}<br>+ foo();<br> #pragma omp target parallel num_threads ((argc > 0) ? argv[1] : argv[2]) // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}}<br>+ foo();<br> #pragma omp target parallel num_threads (foobool(argc)), num_threads (true), num_threads (-5) // expected-error 2 {{directive '#pragma omp target parallel' cannot contain more than one 'num_threads' clause}} expected-error {{argument to 'num_threads' clause must be a strictly positive integer value}}<br>+ foo();<br> #pragma omp target parallel num_threads (S) // expected-error {{'S' does not refer to a value}}<br>+ foo();<br> #pragma omp target parallel num_threads (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}}<br>+ foo();<br> #pragma omp target parallel num_threads (argc)<br>+ foo();<br> #pragma omp target parallel num_threads (N) // expected-error {{argument to 'num_threads' clause must be a strictly positive integer value}}<br>+ foo();<br> #pragma omp target parallel redef_num_threads (argc, argc)<br> foo();<br><br>@@ -32,15 +43,25 @@ T tmain(T argc, S **argv) {<br><br> int main(int argc, char **argv) {<br> #pragma omp target parallel num_threads // expected-error {{expected '(' after 'num_threads'}}<br>+ foo();<br> #pragma omp target parallel num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+ foo();<br> #pragma omp target parallel num_threads () // expected-error {{expected expression}}<br>+ foo();<br> #pragma omp target parallel num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+ foo();<br> #pragma omp target parallel num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel' are ignored}}<br>+ foo();<br> #pragma omp target parallel num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }}<br>+ foo();<br> #pragma omp target parallel num_threads (foobool(argc)), num_threads (true), num_threads (-5) // expected-error 2 {{directive '#pragma omp target parallel' cannot contain more than one 'num_threads' clause}} expected-error {{argument to 'num_threads' clause must be a strictly positive integer value}}<br>+ foo();<br> #pragma omp target parallel num_threads (S1) // expected-error {{'S1' does not refer to a value}}<br>+ foo();<br> #pragma omp target parallel num_threads (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}<br>+ foo();<br> #pragma omp target parallel num_threads (num_threads(tmain<int, char, -1>(argc, argv) // expected-error 2 {{expected ')'}} expected-note 2 {{to match this '('}} expected-note {{in instantiation of function template specialization 'tmain<int, char, -1>' requested here}}<br>+ foo();<br> #pragma omp target parallel redef_num_threads (argc, argc)<br> foo();<br><br><br>Modified: cfe/trunk/test/OpenMP/target_parallel_private_messages.cpp<br>URL: </font><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_private_messages.cpp?rev=259366&r1=259365&r2=259366&view=diff" target="_blank"><u><font size="4" color="#0000FF">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_private_messages.cpp?rev=259366&r1=259365&r2=259366&view=diff</font></u></a><font size="4"><br>==============================================================================<br>--- cfe/trunk/test/OpenMP/target_parallel_private_messages.cpp (original)<br>+++ cfe/trunk/test/OpenMP/target_parallel_private_messages.cpp Mon Feb 1 10:32:47 2016<br>@@ -61,28 +61,47 @@ int foomain(I argc, C **argv) {<br> I i;<br> I &j = i;<br> #pragma omp target parallel private // expected-error {{expected '(' after 'private'}}<br>+{}<br> #pragma omp target parallel private( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+{}<br> #pragma omp target parallel private() // expected-error {{expected expression}}<br>+{}<br> #pragma omp target parallel private(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+{}<br> #pragma omp target parallel private(argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+{}<br> #pragma omp target parallel private(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}<br>+{}<br> #pragma omp target parallel private(argc argv) // expected-error {{expected ',' or ')' in 'private' clause}}<br>+{}<br> #pragma omp target parallel private(argc)<br>+{}<br> #pragma omp target parallel private(S1) // expected-error {{'S1' does not refer to a value}}<br>+{}<br> #pragma omp target parallel private(a, b) // expected-error {{private variable with incomplete type 'S1'}}<br>+{}<br> #pragma omp target parallel private (a, b, c, d, f) // expected-error {{a private variable with incomplete type 'S1'}} expected-error 3 {{shared variable cannot be private}}<br>+{}<br> #pragma omp target parallel private(argv[1]) // expected-error {{expected variable name}}<br>+{}<br> #pragma omp target parallel private(ba)<br>+{}<br> #pragma omp target parallel private(ca) // expected-error {{shared variable cannot be private}}<br>+{}<br> #pragma omp target parallel private(da) // expected-error {{shared variable cannot be private}}<br>+{}<br> #pragma omp target parallel private(S2::S2s) // expected-error {{shared variable cannot be private}}<br>+{}<br> #pragma omp target parallel private(e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{calling a private constructor of class 'S5'}}<br>+{}<br> #pragma omp target parallel private(threadvar, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be private}}<br>+ {}<br> #pragma omp target parallel shared(i), private(i) // expected-error {{shared variable cannot be private}} expected-note {{defined as shared}}<br> foo();<br> #pragma omp target parallel firstprivate(i) private(i) // expected-error {{firstprivate variable cannot be private}} expected-note {{defined as firstprivate}}<br> foo();<br> #pragma omp target parallel private(i)<br>+ {}<br> #pragma omp target parallel private(j)<br> foo();<br> #pragma omp parallel firstprivate(i)<br>@@ -94,19 +113,21 @@ int foomain(I argc, C **argv) {<br> #pragma omp target parallel private(m) // OK<br> foo();<br> #pragma omp target parallel private(h) // expected-error {{threadprivate or thread local variable cannot be private}}<br>+{}<br> #pragma omp target parallel private(B::x) // expected-error {{threadprivate or thread local variable cannot be private}}<br> #pragma omp parallel<br> {<br> int v = 0;<br> int i;<br>-#pragma omp target parallel private(i)<br>- {}<br> }<br> #pragma omp target parallel shared(i)<br>+{}<br> #pragma omp target parallel private(i)<br>+{}<br> #pragma omp target parallel private(j)<br>+{}<br> #pragma omp target parallel private(i)<br>- {}<br>+{}<br> static int si;<br> #pragma omp target parallel private(si) // OK<br> {}<br>@@ -127,28 +148,47 @@ int main(int argc, char **argv) {<br> int i;<br> int &j = i;<br> #pragma omp target parallel private // expected-error {{expected '(' after 'private'}}<br>+{}<br> #pragma omp target parallel private( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+{}<br> #pragma omp target parallel private() // expected-error {{expected expression}}<br>+{}<br> #pragma omp target parallel private(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+{}<br> #pragma omp target parallel private(argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+{}<br> #pragma omp target parallel private(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}<br>+{}<br> #pragma omp target parallel private(argc argv) // expected-error {{expected ',' or ')' in 'private' clause}}<br>+{}<br> #pragma omp target parallel private(argc)<br>+{}<br> #pragma omp target parallel private(S1) // expected-error {{'S1' does not refer to a value}}<br>+{}<br> #pragma omp target parallel private(a, b) // expected-error {{private variable with incomplete type 'S1'}}<br>+{}<br> #pragma omp target parallel private (a, b, c, d, f) // expected-error {{a private variable with incomplete type 'S1'}} expected-error 3 {{shared variable cannot be private}}<br>+{}<br> #pragma omp target parallel private(argv[1]) // expected-error {{expected variable name}}<br>+{}<br> #pragma omp target parallel private(ba)<br>+{}<br> #pragma omp target parallel private(ca) // expected-error {{shared variable cannot be private}}<br>+{}<br> #pragma omp target parallel private(da) // expected-error {{shared variable cannot be private}}<br>+{}<br> #pragma omp target parallel private(S2::S2s) // expected-error {{shared variable cannot be private}}<br>+{}<br> #pragma omp target parallel private(e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{calling a private constructor of class 'S5'}}<br>+{}<br> #pragma omp target parallel private(threadvar, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be private}}<br>+ {}<br> #pragma omp target parallel shared(i), private(i) // expected-error {{shared variable cannot be private}} expected-note {{defined as shared}}<br> foo();<br> #pragma omp target parallel firstprivate(i) private(i) // expected-error {{firstprivate variable cannot be private}} expected-note {{defined as firstprivate}}<br> foo();<br> #pragma omp target parallel private(i)<br>+ {}<br> #pragma omp target parallel private(j)</font><br><font size="4"> foo();<br> #pragma omp parallel firstprivate(i)<br>@@ -160,18 +200,20 @@ int main(int argc, char **argv) {<br> #pragma omp target parallel private(m) // OK<br> foo();<br> #pragma omp target parallel private(h) // expected-error {{threadprivate or thread local variable cannot be private}}<br>+{}<br> #pragma omp target parallel private(B::x) // expected-error {{threadprivate or thread local variable cannot be private}}<br> #pragma omp parallel<br> {<br> int i;<br>-#pragma omp target parallel private(i)<br>- {}<br> }<br> #pragma omp target parallel shared(i)<br>+{}<br> #pragma omp target parallel private(i)<br>+{}<br> #pragma omp target parallel private(j)<br>+{}<br> #pragma omp target parallel private(i)<br>- {}<br>+{}<br> static int si;<br> #pragma omp target parallel private(si) // OK<br> {}<br><br>Modified: cfe/trunk/test/OpenMP/target_parallel_proc_bind_messages.cpp<br>URL: </font><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_proc_bind_messages.cpp?rev=259366&r1=259365&r2=259366&view=diff" target="_blank"><u><font size="4" color="#0000FF">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_proc_bind_messages.cpp?rev=259366&r1=259365&r2=259366&view=diff</font></u></a><font size="4"><br>==============================================================================<br>--- cfe/trunk/test/OpenMP/target_parallel_proc_bind_messages.cpp (original)<br>+++ cfe/trunk/test/OpenMP/target_parallel_proc_bind_messages.cpp Mon Feb 1 10:32:47 2016<br>@@ -4,10 +4,15 @@ void foo();<br><br> int main(int argc, char **argv) {<br> #pragma omp target parallel proc_bind // expected-error {{expected '(' after 'proc_bind'}}<br>+ foo();<br> #pragma omp target parallel proc_bind ( // expected-error {{expected 'master', 'close' or 'spread' in OpenMP clause 'proc_bind'}} expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+ foo();<br> #pragma omp target parallel proc_bind () // expected-error {{expected 'master', 'close' or 'spread' in OpenMP clause 'proc_bind'}}<br>+ foo();<br> #pragma omp target parallel proc_bind (master // expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+ foo();<br> #pragma omp target parallel proc_bind (close), proc_bind(spread) // expected-error {{directive '#pragma omp target parallel' cannot contain more than one 'proc_bind' clause}}<br>+ foo();<br> #pragma omp target parallel proc_bind (x) // expected-error {{expected 'master', 'close' or 'spread' in OpenMP clause 'proc_bind'}}<br> foo();<br><br>@@ -15,6 +20,7 @@ int main(int argc, char **argv) {<br> ++argc;<br><br> #pragma omp target parallel proc_bind(close)<br>+ foo();<br> #pragma omp target parallel proc_bind(spread)<br> ++argc;<br> return 0;<br><br>Modified: cfe/trunk/test/OpenMP/target_parallel_reduction_messages.cpp<br>URL: </font><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_reduction_messages.cpp?rev=259366&r1=259365&r2=259366&view=diff" target="_blank"><u><font size="4" color="#0000FF">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_reduction_messages.cpp?rev=259366&r1=259365&r2=259366&view=diff</font></u></a><font size="4"><br>==============================================================================<br>--- cfe/trunk/test/OpenMP/target_parallel_reduction_messages.cpp (original)<br>+++ cfe/trunk/test/OpenMP/target_parallel_reduction_messages.cpp Mon Feb 1 10:32:47 2016<br>@@ -131,7 +131,7 @@ T tmain(T argc) {<br> foo();<br> #pragma omp target parallel private(i), reduction(+ : j), reduction(+ : q) // expected-error 4 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}<br> foo();<br>-#pragma omp target parallel private(k)<br>+#pragma omp parallel private(k)<br> #pragma omp target parallel reduction(+ : p), reduction(+ : p) // expected-error 2 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}<br> foo();<br> #pragma omp target parallel reduction(+ : p), reduction(+ : p) // expected-error 3 {{variable can appear only once in OpenMP 'reduction' clause}} expected-note 3 {{previously referenced here}}<br>@@ -139,17 +139,20 @@ T tmain(T argc) {<br> #pragma omp target parallel reduction(+ : r) // expected-error 2 {{const-qualified list item cannot be reduction}}<br> foo();<br> #pragma omp target parallel shared(i)<br>-#pragma omp target parallel reduction(min : i)<br>+ foo();<br>+#pragma omp parallel reduction(min : i)<br> #pragma omp target parallel reduction(max : j) // expected-error 2 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}<br> foo();<br> #pragma omp target parallel<br> #pragma omp for private(fl)<br> for (int i = 0; i < 10; ++i)<br>+ {}<br> #pragma omp target parallel reduction(+ : fl)<br> foo();<br> #pragma omp target parallel<br> #pragma omp for reduction(- : fl)<br> for (int i = 0; i < 10; ++i)<br>+ {}<br> #pragma omp target parallel reduction(+ : fl)<br> foo();<br><br>@@ -228,7 +231,7 @@ int main(int argc, char **argv) {<br> foo();<br> #pragma omp target parallel private(i), reduction(+ : j), reduction(+ : q) // expected-error 2 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}<br> foo();<br>-#pragma omp target parallel private(k)<br>+#pragma omp parallel private(k)<br> #pragma omp target parallel reduction(+ : p), reduction(+ : p) // expected-error 2 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}<br> foo();<br> #pragma omp target parallel reduction(+ : p), reduction(+ : p) // expected-error {{variable can appear only once in OpenMP 'reduction' clause}} expected-note {{previously referenced here}}<br>@@ -236,17 +239,20 @@ int main(int argc, char **argv) {<br> #pragma omp target parallel reduction(+ : r) // expected-error {{const-qualified list item cannot be reduction}}<br> foo();<br> #pragma omp target parallel shared(i)<br>-#pragma omp target parallel reduction(min : i)<br>+ foo();<br>+#pragma omp parallel reduction(min : i)<br> #pragma omp target parallel reduction(max : j) // expected-error {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}<br> foo();<br> #pragma omp target parallel<br> #pragma omp for private(fl)<br> for (int i = 0; i < 10; ++i)<br>+ {}<br> #pragma omp target parallel reduction(+ : fl)<br> foo();<br> #pragma omp target parallel<br> #pragma omp for reduction(- : fl)<br> for (int i = 0; i < 10; ++i)<br>+ {}<br> #pragma omp target parallel reduction(+ : fl)<br> foo();<br> static int m;<br><br>Modified: cfe/trunk/test/OpenMP/target_parallel_shared_messages.cpp<br>URL: </font><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_shared_messages.cpp?rev=259366&r1=259365&r2=259366&view=diff" target="_blank"><u><font size="4" color="#0000FF">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_parallel_shared_messages.cpp?rev=259366&r1=259365&r2=259366&view=diff</font></u></a><font size="4"><br>==============================================================================<br>--- cfe/trunk/test/OpenMP/target_parallel_shared_messages.cpp (original)<br>+++ cfe/trunk/test/OpenMP/target_parallel_shared_messages.cpp Mon Feb 1 10:32:47 2016<br>@@ -60,30 +60,49 @@ int main(int argc, char **argv) {<br> int i;<br> int &j = i;<br> #pragma omp target parallel shared // expected-error {{expected '(' after 'shared'}}<br>+ foo();<br> #pragma omp target parallel shared ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+ foo();<br> #pragma omp target parallel shared () // expected-error {{expected expression}}<br>+ foo();<br> #pragma omp target parallel shared (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+ foo();<br> #pragma omp target parallel shared (argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+ foo();<br> #pragma omp target parallel shared (argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}<br>+ foo();<br> #pragma omp target parallel shared (argc)<br>+ foo();<br> #pragma omp target parallel shared (S1) // expected-error {{'S1' does not refer to a value}}<br>+ foo();<br> #pragma omp target parallel shared (a, b, c, d, f)<br>+ foo();<br> #pragma omp target parallel shared (argv[1]) // expected-error {{expected variable name}}<br>+ foo();<br> #pragma omp target parallel shared(ba)<br>+ foo();<br> #pragma omp target parallel shared(ca)<br>+ foo();<br> #pragma omp target parallel shared(da)<br>+ foo();<br> #pragma omp target parallel shared(e, g)<br>+ foo();<br> #pragma omp target parallel shared(h, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be shared}}<br>+ foo();<br> #pragma omp target parallel private(i), shared(i) // expected-error {{private variable cannot be shared}} expected-note {{defined as private}}<br> foo();<br> #pragma omp target parallel firstprivate(i), shared(i) // expected-error {{firstprivate variable cannot be shared}} expected-note {{defined as firstprivate}}<br> foo();<br> #pragma omp target parallel private(i)<br>+ foo();<br> #pragma omp target parallel shared(i)<br>+ foo();<br> #pragma omp target parallel shared(j)<br> foo();<br> #pragma omp target parallel firstprivate(i)<br>+ foo();<br> #pragma omp target parallel shared(i)<br>+ foo();<br> #pragma omp target parallel shared(j)<br> foo();<br><br><br>Modified: cfe/trunk/test/OpenMP/target_private_messages.cpp<br>URL: </font><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_private_messages.cpp?rev=259366&r1=259365&r2=259366&view=diff" target="_blank"><u><font size="4" color="#0000FF">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/target_private_messages.cpp?rev=259366&r1=259365&r2=259366&view=diff</font></u></a><font size="4"><br>==============================================================================<br>--- cfe/trunk/test/OpenMP/target_private_messages.cpp (original)<br>+++ cfe/trunk/test/OpenMP/target_private_messages.cpp Mon Feb 1 10:32:47 2016<br>@@ -90,28 +90,39 @@ int foomain(I argc, C **argv) {<br> int i;<br> int &j = i;<br> #pragma omp target private // expected-error {{expected '(' after 'private'}}<br>+{}<br> #pragma omp target private( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+{}<br> #pragma omp target private() // expected-error {{expected expression}}<br>+{}<br> #pragma omp target private(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+{}<br> #pragma omp target private(argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+{}<br> #pragma omp target private(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}<br>+{}<br> #pragma omp target private(argc)<br>+{}<br> #pragma omp target private(S1) // expected-error {{'S1' does not refer to a value}}<br>+{}<br> #pragma omp target private(a, b) // expected-error {{private variable with incomplete type 'S1'}}<br>+{}<br> #pragma omp target private(argv[1]) // expected-error {{expected variable name}}<br>+{}<br> #pragma omp target private(e, g)<br>+{}<br> #pragma omp target private(h) // expected-error {{threadprivate or thread local variable cannot be private}}<br>+{}<br> #pragma omp target shared(i) // expected-error {{unexpected OpenMP clause 'shared' in directive '#pragma omp target'}}<br> #pragma omp parallel<br> {<br> int v = 0;<br> int i;<br>-#pragma omp target private(i)<br>- {}<br> }<br> #pragma omp parallel shared(i)<br> #pragma omp parallel private(i)<br> #pragma omp target private(j)<br>+{}<br> #pragma omp target private(i)<br> {}<br> return 0;<br>@@ -139,28 +150,40 @@ int main(int argc, char **argv) {<br> int i;<br> int &j = i;<br> #pragma omp target private // expected-error {{expected '(' after 'private'}}<br>+{}<br> #pragma omp target private( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+{}<br> #pragma omp target private() // expected-error {{expected expression}}<br>+{}<br> #pragma omp target private(argc // expected-error {{expected ')'}} expect
ed-note {{to match this '('}}<br>+{}<br> #pragma omp target private(argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}<br>+{}<br> #pragma omp target private(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}<br>+{}<br> #pragma omp target private(argc)<br>+{}<br> #pragma omp target private(S1) // expected-error {{'S1' does not refer to a value}}<br>+{}<br> #pragma omp target private(a, b) // expected-error {{private variable with incomplete type 'S1'}}<br>+{}<br> #pragma omp target private(argv[1]) // expected-error {{expected variable name}}<br>+{}<br> #pragma omp target private(e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{calling a private constructor of class 'S5'}}<br>+{}<br> #pragma omp target private(h) // expected-error {{threadprivate or thread local variable cannot be private}}<br>+{}<br> #pragma omp target private(B::x) // expected-error {{threadprivate or thread local variable cannot be private}}<br>+{}<br> #pragma omp target shared(i) // expected-error {{unexpected OpenMP clause 'shared' in directive '#pragma omp target'}}<br> #pragma omp parallel<br> {<br> int i;<br>-#pragma omp target private(i)<br>- {}<br> }<br> #pragma omp parallel shared(i)<br> #pragma omp parallel private(i)<br> #pragma omp target private(j)<br>+{}<br> #pragma omp target private(i)<br> {}<br> static int si;<br><br>Modified: cfe/trunk/test/OpenMP/teams_reduction_messages.cpp<br>URL: </font><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_reduction_messages.cpp?rev=259366&r1=259365&r2=259366&view=diff" target="_blank"><u><font size="4" color="#0000FF">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/OpenMP/teams_reduction_messages.cpp?rev=259366&r1=259365&r2=259366&view=diff</font></u></a><font size="4"><br>==============================================================================<br>--- cfe/trunk/test/OpenMP/teams_reduction_messages.cpp (original)<br>+++ cfe/trunk/test/OpenMP/teams_reduction_messages.cpp Mon Feb 1 10:32:47 2016<br>@@ -175,6 +175,7 @@ T tmain(T argc) {<br> #pragma omp teams<br> #pragma omp parallel for private(fl)<br> for (int i = 0; i < 10; ++i)<br>+ {}<br> #pragma omp target<br> #pragma omp teams reduction(+ : fl)<br> foo();<br>@@ -182,6 +183,7 @@ T tmain(T argc) {<br> #pragma omp teams<br> #pragma omp parallel for reduction(- : fl)<br> for (int i = 0; i < 10; ++i)<br>+ {}<br> #pragma omp target<br> #pragma omp teams reduction(+ : fl)<br> foo();<br>@@ -306,6 +308,7 @@ int main(int argc, char **argv) {<br> #pragma omp teams<br> #pragma omp parallel for private(fl)<br> for (int i = 0; i < 10; ++i)<br>+ {}<br> #pragma omp target<br> #pragma omp teams reduction(+ : fl)<br> foo();<br>@@ -313,6 +316,7 @@ int main(int argc, char **argv) {<br> #pragma omp teams<br> #pragma omp parallel for reduction(- : fl)<br> for (int i = 0; i < 10; ++i)<br>+ {}<br> #pragma omp target<br> #pragma omp teams reduction(+ : fl)<br> foo();<br><br><br>_______________________________________________<br>cfe-commits mailing list</font><u><font size="4" color="#0000FF"><br></font></u><a href="mailto:cfe-commits@lists.llvm.org"><u><font size="4" color="#0000FF">cfe-commits@lists.llvm.org</font></u></a><u><font size="4" color="#0000FF"><br></font></u><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" target="_blank"><u><font size="4" color="#0000FF">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</font></u></a></ul><br><BR>
</body></html>