1+ // RUN: %clang_cc1 -DF1 -verify -fopenmp -fopenmp-version=60 -triple x86_64-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm-bc %s -o %t-ppc-host-ppc.bc
2+ // RUN: %clang_cc1 -DF1 -DTARGET -verify -fopenmp -fopenmp-version=60 -triple nvptx64-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm %s -fopenmp-is-target-device -fopenmp-host-ir-file-path %t-ppc-host-ppc.bc -o /dev/null
3+ // RUN: %clang_cc1 -DF2 -verify -fopenmp -fopenmp-version=60 -triple x86_64-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm-bc %s -o %t-ppc-host-ppc.bc
4+ // RUN: %clang_cc1 -DF2 -DTARGET -verify -fopenmp -fopenmp-version=60 -triple nvptx64-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm %s -fopenmp-is-target-device -fopenmp-host-ir-file-path %t-ppc-host-ppc.bc -o /dev/null
5+ // RUN: %clang_cc1 -DF3 -verify -fopenmp -fopenmp-version=60 -triple x86_64-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm-bc %s -o %t-ppc-host-ppc.bc
6+ // RUN: %clang_cc1 -DF3 -DTARGET -verify -fopenmp -fopenmp-version=60 -triple nvptx64-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm %s -fopenmp-is-target-device -fopenmp-host-ir-file-path %t-ppc-host-ppc.bc -o /dev/null
17// RUN: %clang_cc1 -DF1 -verify -fopenmp -fopenmp-version=60 -triple x86_64-unknown-unknown -fopenmp-targets=amdgcn-amd-amdhsa -emit-llvm-bc %s -o %t-ppc-host-ppc.bc
2- // RUN: %clang_cc1 -DF1 -verify -fopenmp -fopenmp-version=60 -triple amdgcn-amd-amdhsa -fopenmp-targets=amdgcn-amd-amdhsa -emit-llvm %s -fopenmp-is-target-device -fopenmp-host-ir-file-path %t-ppc-host-ppc.bc -o /dev/null
8+ // RUN: %clang_cc1 -DF1 -DTARGET - verify -fopenmp -fopenmp-version=60 -triple amdgcn-amd-amdhsa -fopenmp-targets=amdgcn-amd-amdhsa -emit-llvm %s -fopenmp-is-target-device -fopenmp-host-ir-file-path %t-ppc-host-ppc.bc -o /dev/null
39// RUN: %clang_cc1 -DF2 -verify -fopenmp -fopenmp-version=60 -triple x86_64-unknown-unknown -fopenmp-targets=amdgcn-amd-amdhsa -emit-llvm-bc %s -o %t-ppc-host-ppc.bc
4- // RUN: %clang_cc1 -DF2 -verify -fopenmp -fopenmp-version=60 -triple amdgcn-amd-amdhsa -fopenmp-targets=amdgcn-amd-amdhsa -emit-llvm %s -fopenmp-is-target-device -fopenmp-host-ir-file-path %t-ppc-host-ppc.bc -o /dev/null
10+ // RUN: %clang_cc1 -DF2 -DTARGET - verify -fopenmp -fopenmp-version=60 -triple amdgcn-amd-amdhsa -fopenmp-targets=amdgcn-amd-amdhsa -emit-llvm %s -fopenmp-is-target-device -fopenmp-host-ir-file-path %t-ppc-host-ppc.bc -o /dev/null
511// RUN: %clang_cc1 -DF3 -verify -fopenmp -fopenmp-version=60 -triple x86_64-unknown-unknown -fopenmp-targets=amdgcn-amd-amdhsa -emit-llvm-bc %s -o %t-ppc-host-ppc.bc
6- // RUN: %clang_cc1 -DF3 -verify -fopenmp -fopenmp-version=60 -triple amdgcn-amd-amdhsa -fopenmp-targets=amdgcn-amd-amdhsa -emit-llvm %s -fopenmp-is-target-device -fopenmp-host-ir-file-path %t-ppc-host-ppc.bc -o /dev/null
12+ // RUN: %clang_cc1 -DF3 -DTARGET - verify -fopenmp -fopenmp-version=60 -triple amdgcn-amd-amdhsa -fopenmp-targets=amdgcn-amd-amdhsa -emit-llvm %s -fopenmp-is-target-device -fopenmp-host-ir-file-path %t-ppc-host-ppc.bc -o /dev/null
713
814// RUN: %clang_cc1 -DF1 -verify -fopenmp -fopenmp-version=60 -triple x86_64-unknown-unknown -fopenmp-targets=spirv64-intel -emit-llvm-bc %s -o %t-spirv-ppc-host-ppc.bc
9- // RUN: %clang_cc1 -DF1 -verify -fopenmp -fopenmp-version=60 -triple spirv64-intel -fopenmp-targets=spirv64-intel -emit-llvm %s -fopenmp-is-target-device -fopenmp-host-ir-file-path %t-spirv-ppc-host-ppc.bc -o /dev/null
15+ // RUN: %clang_cc1 -DF1 -DTARGET - verify -fopenmp -fopenmp-version=60 -triple spirv64-intel -fopenmp-targets=spirv64-intel -emit-llvm %s -fopenmp-is-target-device -fopenmp-host-ir-file-path %t-spirv-ppc-host-ppc.bc -o /dev/null
1016// RUN: %clang_cc1 -DF2 -verify -fopenmp -fopenmp-version=60 -triple x86_64-unknown-unknown -fopenmp-targets=spirv64-intel -emit-llvm-bc %s -o %t-spirv-ppc-host-ppc.bc
11- // RUN: %clang_cc1 -DF2 -verify -fopenmp -fopenmp-version=60 -triple spirv64-intel -fopenmp-targets=spirv64-intel -emit-llvm %s -fopenmp-is-target-device -fopenmp-host-ir-file-path %t-spirv-ppc-host-ppc.bc -o /dev/null
17+ // RUN: %clang_cc1 -DF2 -DTARGET - verify -fopenmp -fopenmp-version=60 -triple spirv64-intel -fopenmp-targets=spirv64-intel -emit-llvm %s -fopenmp-is-target-device -fopenmp-host-ir-file-path %t-spirv-ppc-host-ppc.bc -o /dev/null
1218// RUN: %clang_cc1 -DF3 -verify -fopenmp -fopenmp-version=60 -triple x86_64-unknown-unknown -fopenmp-targets=spirv64-intel -emit-llvm-bc %s -o %t-spirv-ppc-host-ppc.bc
13- // RUN: %clang_cc1 -DF3 -verify -fopenmp -fopenmp-version=60 -triple spirv64-intel -fopenmp-targets=spirv64-intel -emit-llvm %s -fopenmp-is-target-device -fopenmp-host-ir-file-path %t-spirv-ppc-host-ppc.bc -o /dev/null
19+ // RUN: %clang_cc1 -DF3 -DTARGET - verify -fopenmp -fopenmp-version=60 -triple spirv64-intel -fopenmp-targets=spirv64-intel -emit-llvm %s -fopenmp-is-target-device -fopenmp-host-ir-file-path %t-spirv-ppc-host-ppc.bc -o /dev/null
1420
21+ #ifndef TARGET
1522// expected-no-diagnostics
23+ #endif
1624
1725#ifdef F3
1826template <typename tx>
1927tx ftemplate (int n) {
2028 tx a = 0 ;
21-
29+ #ifdef TARGET
30+ // expected-warning@+2 {{clause 'message' is currently not supported on a GPU; clause ignored}} expected-warning@+2 {{clause 'severity' is currently not supported on a GPU; clause ignored}}
31+ #endif
2232 #pragma omp parallel num_threads(strict: tx(20)) severity(fatal) message("msg")
2333 {
2434 }
2535
2636 short b = 1 ;
37+ #ifdef TARGET
38+ // expected-warning@+2 {{clause 'message' is currently not supported on a GPU; clause ignored}} expected-warning@+2 {{clause 'severity' is currently not supported on a GPU; clause ignored}}
39+ #endif
2740 #pragma omp parallel num_threads(strict: b) severity(warning) message("msg")
2841 {
2942 a += b;
@@ -36,10 +49,17 @@ tx ftemplate(int n) {
3649#ifdef F2
3750static
3851int fstatic (int n) {
52+
53+ #ifdef TARGET
54+ // expected-warning@+2 {{clause 'message' is currently not supported on a GPU; clause ignored}}
55+ #endif
3956 #pragma omp target parallel num_threads(strict: n) message("msg")
4057 {
4158 }
4259
60+ #ifdef TARGET
61+ // expected-warning@+2 {{clause 'severity' is currently not supported on a GPU; clause ignored}}
62+ #endif
4363 #pragma omp target parallel num_threads(strict: 32+n) severity(warning)
4464 {
4565 }
@@ -55,11 +75,17 @@ struct S1 {
5575 int r1 (int n){
5676 int b = 1 ;
5777
78+ #ifdef TARGET
79+ // expected-warning@+2 {{clause 'message' is currently not supported on a GPU; clause ignored}} expected-warning@+2 {{clause 'severity' is currently not supported on a GPU; clause ignored}}
80+ #endif
5881 #pragma omp parallel num_threads(strict: n-b) severity(warning) message("msg")
5982 {
6083 this ->a = (double )b + 1.5 ;
6184 }
6285
86+ #ifdef TARGET
87+ // expected-warning@+2 {{clause 'severity' is currently not supported on a GPU; clause ignored}}
88+ #endif
6389 #pragma omp parallel num_threads(strict: 1024) severity(fatal)
6490 {
6591 this ->a = 2.5 ;
0 commit comments