diff --git a/clang/test/OpenMP/declare_target_codegen.cpp b/clang/test/OpenMP/declare_target_codegen.cpp --- a/clang/test/OpenMP/declare_target_codegen.cpp +++ b/clang/test/OpenMP/declare_target_codegen.cpp @@ -3,21 +3,35 @@ // RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -emit-pch -o %t // RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -include-pch %t -o - -DLOAD | FileCheck %s -// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - -fopenmp-version=50 -DOMP5 | FileCheck %s --check-prefix HOST5 -// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm-bc %s -o %t-ppc-host.bc -fopenmp-version=50 -DOMP5 -// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - -fopenmp-version=50 -DOMP5 | FileCheck %s --check-prefix DEV5 +// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - -fopenmp-version=50 -DOMP5plus | FileCheck %s --check-prefix HOST5 +// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm-bc %s -o %t-ppc-host.bc -fopenmp-version=50 -DOMP5plus +// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - -fopenmp-version=50 -DOMP5plus | FileCheck %s --check-prefix DEV5 -// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - -fopenmp-version=50 -DOMP5 | FileCheck %s --check-prefix KMPC-ONLY +// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - -fopenmp-version=50 -DOMP5plus | FileCheck %s --check-prefix KMPC-ONLY -// RUN: %clang_cc1 -verify -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - -fopenmp-version=50 -DOMP5 | FileCheck %s --check-prefix SIMD-ONLY -// RUN: %clang_cc1 -verify -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm-bc %s -o %t-ppc-host.bc -fopenmp-version=50 -DOMP5 -// RUN: %clang_cc1 -verify -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - -fopenmp-version=50 -DOMP5 | FileCheck %s --check-prefix SIMD-ONLY +// RUN: %clang_cc1 -verify -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - -fopenmp-version=50 -DOMP5plus | FileCheck %s --check-prefix SIMD-ONLY +// RUN: %clang_cc1 -verify -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm-bc %s -o %t-ppc-host.bc -fopenmp-version=50 -DOMP5plus +// RUN: %clang_cc1 -verify -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - -fopenmp-version=50 -DOMP5plus | FileCheck %s --check-prefix SIMD-ONLY // RUN: %clang_cc1 -verify -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm-bc %s -o %t-ppc-host.bc -fopenmp-version=45 // RUN: %clang_cc1 -verify -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - -fopenmp-version=45 | FileCheck %s --check-prefix SIMD-ONLY // RUN: %clang_cc1 -verify -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -emit-pch -o %t -fopenmp-version=45 // RUN: %clang_cc1 -verify -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -include-pch %t -verify -o - -fopenmp-version=45 | FileCheck %s --check-prefix SIMD-ONLY +// +// Additional tests without version string. To be updated with each OpenMP version change in case of changed behaviour. +// + +// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - -DOMP5plus | FileCheck %s --check-prefix HOST5 +// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm-bc %s -o %t-ppc-host.bc -DOMP5plus +// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - -DOMP5plus | FileCheck %s --check-prefix DEV5 + +// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - -DOMP5plus | FileCheck %s --check-prefix KMPC-ONLY + +// RUN: %clang_cc1 -verify -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - -DOMP5plus | FileCheck %s --check-prefix SIMD-ONLY +// RUN: %clang_cc1 -verify -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm-bc %s -o %t-ppc-host.bc -DOMP5plus +// RUN: %clang_cc1 -verify -fopenmp-simd -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - -DOMP5plus | FileCheck %s --check-prefix SIMD-ONLY + // expected-no-diagnostics // SIMD-ONLY-NOT: {{__kmpc|__tgt}} @@ -79,7 +93,7 @@ #pragma omp declare target link(eee, fff, ggg, hhh) int out_decl_target = 0; -#ifdef OMP5 +#ifdef OMP5plus #pragma omp declare target(out_decl_target) #endif @@ -249,7 +263,7 @@ // CHECK-DAG: !{i32 1, !"ccc", i32 0, i32 {{[0-9]+}}} // CHECK-DAG: !{{{.+}}virtual_foo -#ifdef OMP5 +#ifdef OMP5plus void host_fun() {} #pragma omp declare target to(host_fun) device_type(host) void device_fun() {} @@ -261,7 +275,7 @@ // DEV5-NOT: define {{.*}}void {{.*}}host_fun{{.*}} // DEV5: define {{.*}}void {{.*}}device_fun{{.*}} // DEV5-NOT: define {{.*}}void {{.*}}host_fun{{.*}} -#endif // OMP5 +#endif // OMP5plus #endif // HEADER diff --git a/clang/test/OpenMP/declare_target_messages.cpp b/clang/test/OpenMP/declare_target_messages.cpp --- a/clang/test/OpenMP/declare_target_messages.cpp +++ b/clang/test/OpenMP/declare_target_messages.cpp @@ -6,6 +6,16 @@ // RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp5,host5 -fopenmp-simd -fopenmp-is-device -fopenmp-version=50 -fnoopenmp-use-tls -ferror-limit 100 -o - %s // RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp45 -fopenmp-version=45 -fopenmp-simd -fnoopenmp-use-tls -ferror-limit 100 -o - %s +// +// Additional tests without version string. To be updated with each OpenMP version change in case of changed behaviour. +// + +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp5,host5 -fopenmp -fnoopenmp-use-tls -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp5,dev5 -fopenmp -fopenmp-is-device -fopenmp-targets=x86_64-apple-macos10.7.0 -aux-triple x86_64-apple-macos10.7.0 -fnoopenmp-use-tls -ferror-limit 100 -o - %s + +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp5,host5 -fopenmp-simd -fnoopenmp-use-tls -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp5,host5 -fopenmp-simd -fopenmp-is-device -fnoopenmp-use-tls -ferror-limit 100 -o - %s + #pragma omp end declare target // expected-error {{unexpected OpenMP directive '#pragma omp end declare target'}} int a, b, z; // omp5-error {{variable captured in declare target region must appear in a to clause}} diff --git a/clang/test/OpenMP/declare_variant_implementation_vendor_codegen.cpp b/clang/test/OpenMP/declare_variant_implementation_vendor_codegen.cpp --- a/clang/test/OpenMP/declare_variant_implementation_vendor_codegen.cpp +++ b/clang/test/OpenMP/declare_variant_implementation_vendor_codegen.cpp @@ -1,6 +1,14 @@ // RUN: %clang_cc1 -verify -fopenmp -x c++ -triple %itanium_abi_triple -emit-llvm %s -fexceptions -fcxx-exceptions -o - -fsanitize-address-use-after-scope -fopenmp-version=45 | FileCheck %s --implicit-check-not='ret i32 {{6|7|8|9|10|12|13|14|15|19|21|22|23|24}}' // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple %itanium_abi_triple -fexceptions -fcxx-exceptions -emit-pch -o %t -fopenmp-version=50 %s // RUN: %clang_cc1 -fopenmp -x c++ -triple %itanium_abi_triple -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify %s -emit-llvm -o - -fopenmp-version=50 | FileCheck %s --implicit-check-not='ret i32 {{6|7|8|9|10|12|13|14|15|19|21|22|23|24}}' + +// +// Additional tests without version string. To be updated with each OpenMP version change in case of changed behaviour. +// + +// RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple %itanium_abi_triple -fexceptions -fcxx-exceptions -emit-pch -o %t %s +// RUN: %clang_cc1 -fopenmp -x c++ -triple %itanium_abi_triple -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --implicit-check-not='ret i32 {{6|7|8|9|10|12|13|14|15|19|21|22|23|24}}' + // expected-no-diagnostics // CHECK-DAG: ret i32 2 diff --git a/clang/test/OpenMP/distribute_parallel_for_simd_loop_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_simd_loop_messages.cpp --- a/clang/test/OpenMP/distribute_parallel_for_simd_loop_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_simd_loop_messages.cpp @@ -4,6 +4,13 @@ // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp4 %s -Wno-openmp-mapping -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=50 -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wno-openmp-mapping -Wuninitialized +// +// Additional tests without version string. To be updated with each OpenMP version change in case of changed behaviour. +// + +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wno-openmp-mapping -Wuninitialized +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wno-openmp-mapping -Wuninitialized + class S { int a; S() : a(0) {} // expected-note {{implicitly declared private here}} diff --git a/clang/test/OpenMP/distribute_simd_loop_messages.cpp b/clang/test/OpenMP/distribute_simd_loop_messages.cpp --- a/clang/test/OpenMP/distribute_simd_loop_messages.cpp +++ b/clang/test/OpenMP/distribute_simd_loop_messages.cpp @@ -4,6 +4,13 @@ // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp4 %s -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=50 -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wuninitialized +// +// Additional tests without version string. To be updated with each OpenMP version change in case of changed behaviour. +// + +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wuninitialized +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wuninitialized + class S5 { int a; S5() : a(0) {} diff --git a/clang/test/OpenMP/for_codegen.cpp b/clang/test/OpenMP/for_codegen.cpp --- a/clang/test/OpenMP/for_codegen.cpp +++ b/clang/test/OpenMP/for_codegen.cpp @@ -16,6 +16,15 @@ // RUN: %clang_cc1 -main-file-name for_codegen.cpp %s -o - -emit-llvm -fprofile-instrument=clang -fprofile-instrument-path=for_codegen-test.profraw | FileCheck --check-prefix SIMD-ONLY0 %s // SIMD-ONLY0-NOT: {{__kmpc|__tgt}} // + +// +// Additional tests without version string. To be updated with each OpenMP version change in case of changed behaviour. +// + +// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple x86_64-unknown-unknown -emit-llvm %s -fexceptions -fcxx-exceptions -o - -fsanitize-address-use-after-scope | FileCheck %s --check-prefix=CHECK --check-prefix=LIFETIME --check-prefix=OMP5 +// RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s +// RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK --check-prefix=OMP5 + // expected-no-diagnostics #ifndef HEADER #define HEADER diff --git a/clang/test/OpenMP/for_collapse_messages.cpp b/clang/test/OpenMP/for_collapse_messages.cpp --- a/clang/test/OpenMP/for_collapse_messages.cpp +++ b/clang/test/OpenMP/for_collapse_messages.cpp @@ -12,6 +12,17 @@ // RUN: %clang_cc1 -verify=expected,omp50 -fopenmp-simd -fopenmp-version=50 -std=c++98 %s -Wuninitialized // RUN: %clang_cc1 -verify=expected,omp50 -fopenmp-simd -fopenmp-version=50 -std=c++11 %s -Wuninitialized +// +// Additional tests without version string. To be updated with each OpenMP version change in case of changed behaviour. +// + +// RUN: %clang_cc1 -verify=expected,omp50 -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify=expected,omp50 -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify=expected,omp50 -fopenmp -std=c++11 %s -Wuninitialized +// RUN: %clang_cc1 -verify=expected,omp50 -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify=expected,omp50 -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify=expected,omp50 -fopenmp-simd -std=c++11 %s -Wuninitialized + void foo() { } diff --git a/clang/test/OpenMP/for_loop_messages.cpp b/clang/test/OpenMP/for_loop_messages.cpp --- a/clang/test/OpenMP/for_loop_messages.cpp +++ b/clang/test/OpenMP/for_loop_messages.cpp @@ -4,6 +4,13 @@ // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp4 %s -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=50 -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wuninitialized +// +// Additional tests without version string. To be updated with each OpenMP version change in case of changed behaviour. +// + +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wuninitialized +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wuninitialized + class S { int a; S() : a(0) {} diff --git a/clang/test/OpenMP/for_simd_loop_messages.cpp b/clang/test/OpenMP/for_simd_loop_messages.cpp --- a/clang/test/OpenMP/for_simd_loop_messages.cpp +++ b/clang/test/OpenMP/for_simd_loop_messages.cpp @@ -4,6 +4,14 @@ // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp4 %s -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=50 -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wuninitialized +// +// Additional tests without version string. To be updated with each OpenMP version change in case of changed behaviour. +// + +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wuninitialized +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wuninitialized + + class S { int a; S() : a(0) {} diff --git a/clang/test/OpenMP/master_taskloop_loop_messages.cpp b/clang/test/OpenMP/master_taskloop_loop_messages.cpp --- a/clang/test/OpenMP/master_taskloop_loop_messages.cpp +++ b/clang/test/OpenMP/master_taskloop_loop_messages.cpp @@ -4,6 +4,13 @@ // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp4 %s -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=50 -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wuninitialized +// +// Additional tests without version string. To be updated with each OpenMP version change in case of changed behaviour. +// + +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wuninitialized +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wuninitialized + class S { int a; S() : a(0) {} diff --git a/clang/test/OpenMP/master_taskloop_simd_loop_messages.cpp b/clang/test/OpenMP/master_taskloop_simd_loop_messages.cpp --- a/clang/test/OpenMP/master_taskloop_simd_loop_messages.cpp +++ b/clang/test/OpenMP/master_taskloop_simd_loop_messages.cpp @@ -4,6 +4,14 @@ // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp4 %s -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=50 -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wuninitialized +// +// Additional tests without version string. To be updated with each OpenMP version change in case of changed behaviour. +// + +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wuninitialized +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wuninitialized + + class S { int a; S() : a(0) {} diff --git a/clang/test/OpenMP/nesting_of_regions.cpp b/clang/test/OpenMP/nesting_of_regions.cpp --- a/clang/test/OpenMP/nesting_of_regions.cpp +++ b/clang/test/OpenMP/nesting_of_regions.cpp @@ -7,6 +7,13 @@ // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=50 -verify=expected,omp50 %s // SIMD-ONLY0-NOT: {{__kmpc|__tgt}} +// +// Additional tests without version string. To be updated with each OpenMP version change in case of changed behaviour. +// + +// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify=expected,omp50 %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify=expected,omp50 %s + void bar(); template diff --git a/clang/test/OpenMP/parallel_for_codegen.cpp b/clang/test/OpenMP/parallel_for_codegen.cpp --- a/clang/test/OpenMP/parallel_for_codegen.cpp +++ b/clang/test/OpenMP/parallel_for_codegen.cpp @@ -1,8 +1,8 @@ -// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple x86_64-unknown-unknown -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck %s --check-prefixes=OMP50,CHECK +// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple x86_64-unknown-unknown -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck %s --check-prefixes=OMP5plus0,CHECK // RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -x c++ -triple x86_64-unknown-unknown -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck %s --check-prefixes=OMP45,CHECK // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s -// RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefixes=OMP50,CHECK +// RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefixes=OMP5plus0,CHECK // RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s // RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefixes=OMP45,CHECK @@ -18,16 +18,28 @@ // SIMD-ONLY0-NOT: {{__kmpc|__tgt}} // expected-no-diagnostics -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=50 -DOMP5 -x c++ -triple x86_64-unknown-unknown -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck --check-prefix=OMP5 %s -// RUN: %clang_cc1 -fopenmp -fopenmp-version=50 -DOMP5 -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s -// RUN: %clang_cc1 -fopenmp -fopenmp-version=50 -DOMP5 -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix=OMP5 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=50 -DOMP5 -x c++ -triple x86_64-unknown-unknown -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck --check-prefix SIMD-ONLY0 %s -// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=50 -DOMP5 -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s -// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=50 -DOMP5 -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=50 -DOMP5plus -x c++ -triple x86_64-unknown-unknown -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck --check-prefix=OMP5plus %s +// RUN: %clang_cc1 -fopenmp -fopenmp-version=50 -DOMP5plus -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s +// RUN: %clang_cc1 -fopenmp -fopenmp-version=50 -DOMP5plus -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix=OMP5plus %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=50 -DOMP5plus -x c++ -triple x86_64-unknown-unknown -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck --check-prefix SIMD-ONLY0 %s +// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=50 -DOMP5plus -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s +// RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=50 -DOMP5plus -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s + +// +// Additional tests without version string. To be updated with each OpenMP version change in case of changed behaviour. +// + +// RUN: %clang_cc1 -verify -fopenmp -DOMP5plus -x c++ -triple x86_64-unknown-unknown -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck --check-prefix=OMP5plus %s +// RUN: %clang_cc1 -fopenmp -DOMP5plus -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s +// RUN: %clang_cc1 -fopenmp -DOMP5plus -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix=OMP5plus %s +// RUN: %clang_cc1 -verify -fopenmp-simd -DOMP5plus -x c++ -triple x86_64-unknown-unknown -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck --check-prefix SIMD-ONLY0 %s +// RUN: %clang_cc1 -fopenmp-simd -DOMP5plus -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s +// RUN: %clang_cc1 -fopenmp-simd -DOMP5plus -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY0 %s + #ifndef HEADER #define HEADER -#ifndef OMP5 +#ifndef OMP5plus // CHECK-DAG: [[IDENT_T_TY:%.+]] = type { i32, i32, i32, i32, i8* } // CHECK-DAG: [[LOOP_LOC:@.+]] = private unnamed_addr global [[IDENT_T_TY]] { i32 0, i32 514, i32 0, i32 0, i8* @@ -201,7 +213,7 @@ // CHECK: define internal void [[OMP_PARALLEL_FUNC]](i32* noalias [[GTID_PARAM_ADDR:%.+]], i32* noalias %{{.+}}, float** nonnull align 8 dereferenceable(8) %{{.+}}, float** nonnull align 8 dereferenceable(8) %{{.+}}, float** nonnull align 8 dereferenceable(8) %{{.+}}, float** nonnull align 8 dereferenceable(8) %{{.+}}) // CHECK: store i32* [[GTID_PARAM_ADDR]], i32** [[GTID_REF_ADDR:%.+]], // OMP45: call void @__kmpc_dispatch_init_8u([[IDENT_T_TY]]* [[DEFAULT_LOC]], i32 [[GTID:%.+]], i32 35, i64 0, i64 16908287, i64 1, i64 1) -// OMP50: call void @__kmpc_dispatch_init_8u([[IDENT_T_TY]]* [[DEFAULT_LOC]], i32 [[GTID:%.+]], i32 1073741859, i64 0, i64 16908287, i64 1, i64 1) +// OMP5plus0: call void @__kmpc_dispatch_init_8u([[IDENT_T_TY]]* [[DEFAULT_LOC]], i32 [[GTID:%.+]], i32 1073741859, i64 0, i64 16908287, i64 1, i64 1) // // CHECK: [[HASWORK:%.+]] = call i32 @__kmpc_dispatch_next_8u([[IDENT_T_TY]]* [[DEFAULT_LOC]], i32 [[GTID]], i32* [[OMP_ISLAST:%[^,]+]], i64* [[OMP_LB:%[^,]+]], i64* [[OMP_UB:%[^,]+]], i64* [[OMP_ST:%[^,]+]]) // CHECK-NEXT: [[O_CMP:%.+]] = icmp ne i32 [[HASWORK]], 0 @@ -245,7 +257,7 @@ // CHECK: define internal void [[OMP_PARALLEL_FUNC]](i32* noalias [[GTID_PARAM_ADDR:%.+]], i32* noalias %{{.+}}, float** nonnull align 8 dereferenceable(8) %{{.+}}, float** nonnull align 8 dereferenceable(8) %{{.+}}, float** nonnull align 8 dereferenceable(8) %{{.+}}, float** nonnull align 8 dereferenceable(8) %{{.+}}) // CHECK: store i32* [[GTID_PARAM_ADDR]], i32** [[GTID_REF_ADDR:%.+]], // OMP45: call void @__kmpc_dispatch_init_8u([[IDENT_T_TY]]* [[DEFAULT_LOC]], i32 [[GTID:%.+]], i32 36, i64 0, i64 16908287, i64 1, i64 7) -// OMP50: call void @__kmpc_dispatch_init_8u([[IDENT_T_TY]]* [[DEFAULT_LOC]], i32 [[GTID:%.+]], i32 1073741860, i64 0, i64 16908287, i64 1, i64 7) +// OMP5plus0: call void @__kmpc_dispatch_init_8u([[IDENT_T_TY]]* [[DEFAULT_LOC]], i32 [[GTID:%.+]], i32 1073741860, i64 0, i64 16908287, i64 1, i64 7) // // CHECK: [[HASWORK:%.+]] = call i32 @__kmpc_dispatch_next_8u([[IDENT_T_TY]]* [[DEFAULT_LOC]], i32 [[GTID]], i32* [[OMP_ISLAST:%[^,]+]], i64* [[OMP_LB:%[^,]+]], i64* [[OMP_UB:%[^,]+]], i64* [[OMP_ST:%[^,]+]]) // CHECK-NEXT: [[O_CMP:%.+]] = icmp ne i32 [[HASWORK]], 0 @@ -291,7 +303,7 @@ // CHECK: define internal void [[OMP_PARALLEL_FUNC]](i32* noalias [[GTID_PARAM_ADDR:%.+]], i32* noalias %{{.+}}, i32* nonnull align 4 dereferenceable(4) %{{.+}}, float** nonnull align 8 dereferenceable(8) %{{.+}}, float** nonnull align 8 dereferenceable(8) %{{.+}}, float** nonnull align 8 dereferenceable(8) %{{.+}}, float** nonnull align 8 dereferenceable(8) %{{.+}}) // CHECK: store i32* [[GTID_PARAM_ADDR]], i32** [[GTID_REF_ADDR:%.+]], // OMP45: call void @__kmpc_dispatch_init_8([[IDENT_T_TY]]* [[DEFAULT_LOC]], i32 [[GTID:%.+]], i32 38, i64 0, i64 [[LAST_ITER:%[^,]+]], i64 1, i64 1) -// OMP50: call void @__kmpc_dispatch_init_8([[IDENT_T_TY]]* [[DEFAULT_LOC]], i32 [[GTID:%.+]], i32 1073741862, i64 0, i64 [[LAST_ITER:%[^,]+]], i64 1, i64 1) +// OMP5plus0: call void @__kmpc_dispatch_init_8([[IDENT_T_TY]]* [[DEFAULT_LOC]], i32 [[GTID:%.+]], i32 1073741862, i64 0, i64 [[LAST_ITER:%[^,]+]], i64 1, i64 1) // // CHECK: [[HASWORK:%.+]] = call i32 @__kmpc_dispatch_next_8([[IDENT_T_TY]]* [[DEFAULT_LOC]], i32 [[GTID:%.+]], i32* [[OMP_ISLAST:%[^,]+]], i64* [[OMP_LB:%[^,]+]], i64* [[OMP_UB:%[^,]+]], i64* [[OMP_ST:%[^,]+]]) // CHECK-NEXT: [[O_CMP:%.+]] = icmp ne i32 [[HASWORK]], 0 @@ -336,7 +348,7 @@ // CHECK: define internal void [[OMP_PARALLEL_FUNC]](i32* noalias [[GTID_PARAM_ADDR:%.+]], i32* noalias %{{.+}}, float** nonnull align 8 dereferenceable(8) %{{.+}}, float** nonnull align 8 dereferenceable(8) %{{.+}}, float** nonnull align 8 dereferenceable(8) %{{.+}}, float** nonnull align 8 dereferenceable(8) %{{.+}}) // CHECK: store i32* [[GTID_PARAM_ADDR]], i32** [[GTID_REF_ADDR:%.+]], // OMP45: call void @__kmpc_dispatch_init_4([[IDENT_T_TY]]* [[DEFAULT_LOC]], i32 [[GTID:%.+]], i32 37, i32 0, i32 199, i32 1, i32 1) -// OMP50: call void @__kmpc_dispatch_init_4([[IDENT_T_TY]]* [[DEFAULT_LOC]], i32 [[GTID:%.+]], i32 1073741861, i32 0, i32 199, i32 1, i32 1) +// OMP5plus0: call void @__kmpc_dispatch_init_4([[IDENT_T_TY]]* [[DEFAULT_LOC]], i32 [[GTID:%.+]], i32 1073741861, i32 0, i32 199, i32 1, i32 1) // // CHECK: [[HASWORK:%.+]] = call i32 @__kmpc_dispatch_next_4([[IDENT_T_TY]]* [[DEFAULT_LOC]], i32 [[GTID]], i32* [[OMP_ISLAST:%[^,]+]], i32* [[OMP_LB:%[^,]+]], i32* [[OMP_UB:%[^,]+]], i32* [[OMP_ST:%[^,]+]]) // CHECK-NEXT: [[O_CMP:%.+]] = icmp ne i32 [[HASWORK]], 0 @@ -397,246 +409,246 @@ // Check source line corresponds to "#pragma omp parallel for schedule(static, 5)" above: // TERM_DEBUG-DAG: [[DBG_LOC_START]] = !DILocation(line: [[@LINE-17]], -#else // OMP5 -// OMP5-LABEL: increment +#else // OMP5plus +// OMP5plus-LABEL: increment int increment () { -// OMP5: [[GTID:%.+]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* [[DEFAULT_LOC:[@%].+]]) +// OMP5plus: [[GTID:%.+]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* [[DEFAULT_LOC:[@%].+]]) #pragma omp for // Determine UB = min(UB, GlobalUB) -// OMP5: call void @__kmpc_for_static_init_4(%struct.ident_t* [[LOOP_LOC:[@%].+]], i32 [[GTID]], i32 34, i32* [[IS_LAST:%[^,]+]], i32* [[OMP_LB:%[^,]+]], i32* [[OMP_UB:%[^,]+]], i32* [[OMP_ST:%[^,]+]], i32 1, i32 1) -// OMP5-NEXT: [[UB:%.+]] = load i32, i32* [[OMP_UB]] -// OMP5-NEXT: [[UBCMP:%.+]] = icmp sgt i32 [[UB]], 4 -// OMP5-NEXT: br i1 [[UBCMP]], label [[UB_TRUE:%[^,]+]], label [[UB_FALSE:%[^,]+]] -// OMP5: [[UBRESULT:%.+]] = phi i32 [ 4, [[UB_TRUE]] ], [ [[UBVAL:%[^,]+]], [[UB_FALSE]] ] -// OMP5-NEXT: store i32 [[UBRESULT]], i32* [[OMP_UB]] -// OMP5-NEXT: [[LB:%.+]] = load i32, i32* [[OMP_LB]] -// OMP5-NEXT: store i32 [[LB]], i32* [[OMP_IV:[^,]+]] -// OMP5-NEXT: br label %[[LOOP1_HEAD:.+]] +// OMP5plus: call void @__kmpc_for_static_init_4(%struct.ident_t* [[LOOP_LOC:[@%].+]], i32 [[GTID]], i32 34, i32* [[IS_LAST:%[^,]+]], i32* [[OMP_LB:%[^,]+]], i32* [[OMP_UB:%[^,]+]], i32* [[OMP_ST:%[^,]+]], i32 1, i32 1) +// OMP5plus-NEXT: [[UB:%.+]] = load i32, i32* [[OMP_UB]] +// OMP5plus-NEXT: [[UBCMP:%.+]] = icmp sgt i32 [[UB]], 4 +// OMP5plus-NEXT: br i1 [[UBCMP]], label [[UB_TRUE:%[^,]+]], label [[UB_FALSE:%[^,]+]] +// OMP5plus: [[UBRESULT:%.+]] = phi i32 [ 4, [[UB_TRUE]] ], [ [[UBVAL:%[^,]+]], [[UB_FALSE]] ] +// OMP5plus-NEXT: store i32 [[UBRESULT]], i32* [[OMP_UB]] +// OMP5plus-NEXT: [[LB:%.+]] = load i32, i32* [[OMP_LB]] +// OMP5plus-NEXT: store i32 [[LB]], i32* [[OMP_IV:[^,]+]] +// OMP5plus-NEXT: br label %[[LOOP1_HEAD:.+]] // Loop header -// OMP5: [[LOOP1_HEAD]] -// OMP5: [[IV:%.+]] = load i32, i32* [[OMP_IV]] -// OMP5-NEXT: [[UB:%.+]] = load i32, i32* [[OMP_UB]] -// OMP5-NEXT: [[CMP:%.+]] = icmp sle i32 [[IV]], [[UB]] -// OMP5-NEXT: br i1 [[CMP]], label %[[LOOP1_BODY:[^,]+]], label %[[LOOP1_END:[^,]+]] +// OMP5plus: [[LOOP1_HEAD]] +// OMP5plus: [[IV:%.+]] = load i32, i32* [[OMP_IV]] +// OMP5plus-NEXT: [[UB:%.+]] = load i32, i32* [[OMP_UB]] +// OMP5plus-NEXT: [[CMP:%.+]] = icmp sle i32 [[IV]], [[UB]] +// OMP5plus-NEXT: br i1 [[CMP]], label %[[LOOP1_BODY:[^,]+]], label %[[LOOP1_END:[^,]+]] for (int i = 0 ; i != 5; ++i) // Start of body: calculate i from IV: -// OMP5: [[LOOP1_BODY]] -// OMP5: [[IV1_1:%.+]] = load i32, i32* [[OMP_IV]] -// OMP5-NEXT: [[CALC_I_1:%.+]] = mul nsw i32 [[IV1_1]], 1 -// OMP5-NEXT: [[CALC_I_2:%.+]] = add nsw i32 0, [[CALC_I_1]] -// OMP5-NEXT: store i32 [[CALC_I_2]], i32* [[LC_I:.+]] -// OMP5: [[IV1_2:%.+]] = load i32, i32* [[OMP_IV]]{{.*}} -// OMP5-NEXT: [[ADD1_2:%.+]] = add nsw i32 [[IV1_2]], 1 -// OMP5-NEXT: store i32 [[ADD1_2]], i32* [[OMP_IV]] -// OMP5-NEXT: br label %[[LOOP1_HEAD]] +// OMP5plus: [[LOOP1_BODY]] +// OMP5plus: [[IV1_1:%.+]] = load i32, i32* [[OMP_IV]] +// OMP5plus-NEXT: [[CALC_I_1:%.+]] = mul nsw i32 [[IV1_1]], 1 +// OMP5plus-NEXT: [[CALC_I_2:%.+]] = add nsw i32 0, [[CALC_I_1]] +// OMP5plus-NEXT: store i32 [[CALC_I_2]], i32* [[LC_I:.+]] +// OMP5plus: [[IV1_2:%.+]] = load i32, i32* [[OMP_IV]]{{.*}} +// OMP5plus-NEXT: [[ADD1_2:%.+]] = add nsw i32 [[IV1_2]], 1 +// OMP5plus-NEXT: store i32 [[ADD1_2]], i32* [[OMP_IV]] +// OMP5plus-NEXT: br label %[[LOOP1_HEAD]] ; -// OMP5: [[LOOP1_END]] -// OMP5: call void @__kmpc_for_static_fini(%struct.ident_t* [[LOOP_LOC]], i32 [[GTID]]) -// OMP5: __kmpc_barrier +// OMP5plus: [[LOOP1_END]] +// OMP5plus: call void @__kmpc_for_static_fini(%struct.ident_t* [[LOOP_LOC]], i32 [[GTID]]) +// OMP5plus: __kmpc_barrier return 0; -// OMP5: ret i32 0 +// OMP5plus: ret i32 0 } -// OMP5-LABEL: decrement_nowait +// OMP5plus-LABEL: decrement_nowait int decrement_nowait () { -// OMP5: [[GTID:%.+]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* [[DEFAULT_LOC:[@%].+]]) +// OMP5plus: [[GTID:%.+]] = call i32 @__kmpc_global_thread_num(%struct.ident_t* [[DEFAULT_LOC:[@%].+]]) #pragma omp for nowait // Determine UB = min(UB, GlobalUB) -// OMP5: call void @__kmpc_for_static_init_4(%struct.ident_t* [[LOOP_LOC]], i32 [[GTID]], i32 34, i32* [[IS_LAST:%[^,]+]], i32* [[OMP_LB:%[^,]+]], i32* [[OMP_UB:%[^,]+]], i32* [[OMP_ST:%[^,]+]], i32 1, i32 1) -// OMP5-NEXT: [[UB:%.+]] = load i32, i32* [[OMP_UB]] -// OMP5-NEXT: [[UBCMP:%.+]] = icmp sgt i32 [[UB]], 4 -// OMP5-NEXT: br i1 [[UBCMP]], label [[UB_TRUE:%[^,]+]], label [[UB_FALSE:%[^,]+]] -// OMP5: [[UBRESULT:%.+]] = phi i32 [ 4, [[UB_TRUE]] ], [ [[UBVAL:%[^,]+]], [[UB_FALSE]] ] -// OMP5-NEXT: store i32 [[UBRESULT]], i32* [[OMP_UB]] -// OMP5-NEXT: [[LB:%.+]] = load i32, i32* [[OMP_LB]] -// OMP5-NEXT: store i32 [[LB]], i32* [[OMP_IV:[^,]+]] -// OMP5-NEXT: br label %[[LOOP1_HEAD:.+]] +// OMP5plus: call void @__kmpc_for_static_init_4(%struct.ident_t* [[LOOP_LOC]], i32 [[GTID]], i32 34, i32* [[IS_LAST:%[^,]+]], i32* [[OMP_LB:%[^,]+]], i32* [[OMP_UB:%[^,]+]], i32* [[OMP_ST:%[^,]+]], i32 1, i32 1) +// OMP5plus-NEXT: [[UB:%.+]] = load i32, i32* [[OMP_UB]] +// OMP5plus-NEXT: [[UBCMP:%.+]] = icmp sgt i32 [[UB]], 4 +// OMP5plus-NEXT: br i1 [[UBCMP]], label [[UB_TRUE:%[^,]+]], label [[UB_FALSE:%[^,]+]] +// OMP5plus: [[UBRESULT:%.+]] = phi i32 [ 4, [[UB_TRUE]] ], [ [[UBVAL:%[^,]+]], [[UB_FALSE]] ] +// OMP5plus-NEXT: store i32 [[UBRESULT]], i32* [[OMP_UB]] +// OMP5plus-NEXT: [[LB:%.+]] = load i32, i32* [[OMP_LB]] +// OMP5plus-NEXT: store i32 [[LB]], i32* [[OMP_IV:[^,]+]] +// OMP5plus-NEXT: br label %[[LOOP1_HEAD:.+]] // Loop header -// OMP5: [[LOOP1_HEAD]] -// OMP5: [[IV:%.+]] = load i32, i32* [[OMP_IV]] -// OMP5-NEXT: [[UB:%.+]] = load i32, i32* [[OMP_UB]] -// OMP5-NEXT: [[CMP:%.+]] = icmp sle i32 [[IV]], [[UB]] -// OMP5-NEXT: br i1 [[CMP]], label %[[LOOP1_BODY:[^,]+]], label %[[LOOP1_END:[^,]+]] +// OMP5plus: [[LOOP1_HEAD]] +// OMP5plus: [[IV:%.+]] = load i32, i32* [[OMP_IV]] +// OMP5plus-NEXT: [[UB:%.+]] = load i32, i32* [[OMP_UB]] +// OMP5plus-NEXT: [[CMP:%.+]] = icmp sle i32 [[IV]], [[UB]] +// OMP5plus-NEXT: br i1 [[CMP]], label %[[LOOP1_BODY:[^,]+]], label %[[LOOP1_END:[^,]+]] for (int j = 5 ; j != 0; --j) // Start of body: calculate i from IV: -// OMP5: [[LOOP1_BODY]] -// OMP5: [[IV2_1:%.+]] = load i32, i32* [[OMP_IV]] -// OMP5-NEXT: [[CALC_II_1:%.+]] = mul nsw i32 [[IV2_1]], 1 -// OMP5-NEXT: [[CALC_II_2:%.+]] = sub nsw i32 5, [[CALC_II_1]] -// OMP5-NEXT: store i32 [[CALC_II_2]], i32* [[LC_I:.+]] -// OMP5: [[IV2_2:%.+]] = load i32, i32* [[OMP_IV]]{{.*}} -// OMP5-NEXT: [[ADD2_2:%.+]] = add nsw i32 [[IV2_2]], 1 -// OMP5-NEXT: store i32 [[ADD2_2]], i32* [[OMP_IV]] -// OMP5-NEXT: br label %[[LOOP1_HEAD]] +// OMP5plus: [[LOOP1_BODY]] +// OMP5plus: [[IV2_1:%.+]] = load i32, i32* [[OMP_IV]] +// OMP5plus-NEXT: [[CALC_II_1:%.+]] = mul nsw i32 [[IV2_1]], 1 +// OMP5plus-NEXT: [[CALC_II_2:%.+]] = sub nsw i32 5, [[CALC_II_1]] +// OMP5plus-NEXT: store i32 [[CALC_II_2]], i32* [[LC_I:.+]] +// OMP5plus: [[IV2_2:%.+]] = load i32, i32* [[OMP_IV]]{{.*}} +// OMP5plus-NEXT: [[ADD2_2:%.+]] = add nsw i32 [[IV2_2]], 1 +// OMP5plus-NEXT: store i32 [[ADD2_2]], i32* [[OMP_IV]] +// OMP5plus-NEXT: br label %[[LOOP1_HEAD]] ; -// OMP5: [[LOOP1_END]] -// OMP5: call void @__kmpc_for_static_fini(%struct.ident_t* [[LOOP_LOC]], i32 [[GTID]]) -// OMP5-NOT: __kmpc_barrier +// OMP5plus: [[LOOP1_END]] +// OMP5plus: call void @__kmpc_for_static_fini(%struct.ident_t* [[LOOP_LOC]], i32 [[GTID]]) +// OMP5plus-NOT: __kmpc_barrier return 0; -// OMP5: ret i32 0 +// OMP5plus: ret i32 0 } -// OMP5-LABEL: range_for_single +// OMP5plus-LABEL: range_for_single void range_for_single() { int arr[10] = {0}; -// OMP5: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* {{.+}}, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, [10 x i32]*)* [[OUTLINED:@.+]] to void (i32*, i32*, ...)*), [10 x i32]* %{{.+}}) +// OMP5plus: call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* {{.+}}, i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, [10 x i32]*)* [[OUTLINED:@.+]] to void (i32*, i32*, ...)*), [10 x i32]* %{{.+}}) #pragma omp parallel for for (auto &a : arr) (void)a; } -// OMP5: define internal void @.omp_outlined.(i32* {{.+}}, i32* {{.+}}, [10 x i32]* nonnull align 4 dereferenceable(40) %arr) -// OMP5: [[ARR_ADDR:%.+]] = alloca [10 x i32]*, -// OMP5: [[IV:%.+]] = alloca i64, -// OMP5: [[RANGE_ADDR:%.+]] = alloca [10 x i32]*, -// OMP5: [[END_ADDR:%.+]] = alloca i32*, -// OMP5: alloca i32*, -// OMP5: alloca i32*, -// OMP5: alloca i64, -// OMP5: [[BEGIN_INIT:%.+]] = alloca i32*, -// OMP5: [[LB:%.+]] = alloca i64, -// OMP5: [[UB:%.+]] = alloca i64, -// OMP5: [[STRIDE:%.+]] = alloca i64, -// OMP5: [[IS_LAST:%.+]] = alloca i32, -// OMP5: [[BEGIN:%.+]] = alloca i32*, -// OMP5: [[A_PTR:%.+]] = alloca i32*, +// OMP5plus: define internal void @.omp_outlined.(i32* {{.+}}, i32* {{.+}}, [10 x i32]* nonnull align 4 dereferenceable(40) %arr) +// OMP5plus: [[ARR_ADDR:%.+]] = alloca [10 x i32]*, +// OMP5plus: [[IV:%.+]] = alloca i64, +// OMP5plus: [[RANGE_ADDR:%.+]] = alloca [10 x i32]*, +// OMP5plus: [[END_ADDR:%.+]] = alloca i32*, +// OMP5plus: alloca i32*, +// OMP5plus: alloca i32*, +// OMP5plus: alloca i64, +// OMP5plus: [[BEGIN_INIT:%.+]] = alloca i32*, +// OMP5plus: [[LB:%.+]] = alloca i64, +// OMP5plus: [[UB:%.+]] = alloca i64, +// OMP5plus: [[STRIDE:%.+]] = alloca i64, +// OMP5plus: [[IS_LAST:%.+]] = alloca i32, +// OMP5plus: [[BEGIN:%.+]] = alloca i32*, +// OMP5plus: [[A_PTR:%.+]] = alloca i32*, // __range = arr; -// OMP5: [[ARR:%.+]] = load [10 x i32]*, [10 x i32]** [[ARR_ADDR]], -// OMP5: store [10 x i32]* [[ARR]], [10 x i32]** [[RANGE_ADDR]], +// OMP5plus: [[ARR:%.+]] = load [10 x i32]*, [10 x i32]** [[ARR_ADDR]], +// OMP5plus: store [10 x i32]* [[ARR]], [10 x i32]** [[RANGE_ADDR]], // __end = end(_range); -// OMP5: [[RANGE:%.+]] = load [10 x i32]*, [10 x i32]** [[RANGE_ADDR]], -// OMP5: [[RANGE_0:%.+]] = getelementptr inbounds [10 x i32], [10 x i32]* [[RANGE]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 -// OMP5: [[RANGE_10:%.+]] = getelementptr inbounds i32, i32* [[RANGE_0]], i{{[0-9]+}} 10 -// OMP5: store i32* [[RANGE_10]], i32** [[END_ADDR]], +// OMP5plus: [[RANGE:%.+]] = load [10 x i32]*, [10 x i32]** [[RANGE_ADDR]], +// OMP5plus: [[RANGE_0:%.+]] = getelementptr inbounds [10 x i32], [10 x i32]* [[RANGE]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 +// OMP5plus: [[RANGE_10:%.+]] = getelementptr inbounds i32, i32* [[RANGE_0]], i{{[0-9]+}} 10 +// OMP5plus: store i32* [[RANGE_10]], i32** [[END_ADDR]], -// OMP5: [[RANGE:%.+]] = load [10 x i32]*, [10 x i32]** [[RANGE_ADDR]], -// OMP5: [[RANGE_0:%.+]] = getelementptr inbounds [10 x i32], [10 x i32]* [[RANGE]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 -// OMP5: store i32* [[RANGE_0]], i32** [[CAP1:%.+]], -// OMP5: [[END:%.+]] = load i32*, i32** [[END_ADDR]], -// OMP5: store i32* [[END]], i32** [[CAP2:%.+]], +// OMP5plus: [[RANGE:%.+]] = load [10 x i32]*, [10 x i32]** [[RANGE_ADDR]], +// OMP5plus: [[RANGE_0:%.+]] = getelementptr inbounds [10 x i32], [10 x i32]* [[RANGE]], i{{[0-9]+}} 0, i{{[0-9]+}} 0 +// OMP5plus: store i32* [[RANGE_0]], i32** [[CAP1:%.+]], +// OMP5plus: [[END:%.+]] = load i32*, i32** [[END_ADDR]], +// OMP5plus: store i32* [[END]], i32** [[CAP2:%.+]], // calculate number of elements. -// OMP5: [[CAP2_VAL:%.+]] = load i32*, i32** [[CAP2]], -// OMP5: [[CAP1_VAL:%.+]] = load i32*, i32** [[CAP1]], -// OMP5: [[CAP2_I64:%.+]] = ptrtoint i32* [[CAP2_VAL]] to i64 -// OMP5: [[CAP1_I64:%.+]] = ptrtoint i32* [[CAP1_VAL]] to i64 -// OMP5: [[DIFF:%.+]] = sub i64 [[CAP2_I64]], [[CAP1_I64]] -// OMP5: [[NUM:%.+]] = sdiv exact i64 [[DIFF]], 4 -// OMP5: [[NUM1:%.+]] = sub nsw i64 [[NUM]], 1 -// OMP5: [[NUM2:%.+]] = add nsw i64 [[NUM1]], 1 -// OMP5: [[NUM3:%.+]] = sdiv i64 [[NUM2]], 1 -// OMP5: [[NUM4:%.+]] = sub nsw i64 [[NUM3]], 1 -// OMP5: store i64 [[NUM4]], i64* [[CAP3:%.+]], -// OMP5: [[RANGE_0:%.+]] = load i32*, i32** [[CAP1]], +// OMP5plus: [[CAP2_VAL:%.+]] = load i32*, i32** [[CAP2]], +// OMP5plus: [[CAP1_VAL:%.+]] = load i32*, i32** [[CAP1]], +// OMP5plus: [[CAP2_I64:%.+]] = ptrtoint i32* [[CAP2_VAL]] to i64 +// OMP5plus: [[CAP1_I64:%.+]] = ptrtoint i32* [[CAP1_VAL]] to i64 +// OMP5plus: [[DIFF:%.+]] = sub i64 [[CAP2_I64]], [[CAP1_I64]] +// OMP5plus: [[NUM:%.+]] = sdiv exact i64 [[DIFF]], 4 +// OMP5plus: [[NUM1:%.+]] = sub nsw i64 [[NUM]], 1 +// OMP5plus: [[NUM2:%.+]] = add nsw i64 [[NUM1]], 1 +// OMP5plus: [[NUM3:%.+]] = sdiv i64 [[NUM2]], 1 +// OMP5plus: [[NUM4:%.+]] = sub nsw i64 [[NUM3]], 1 +// OMP5plus: store i64 [[NUM4]], i64* [[CAP3:%.+]], +// OMP5plus: [[RANGE_0:%.+]] = load i32*, i32** [[CAP1]], // __begin = begin(range); -// OMP5: store i32* [[RANGE_0]], i32** [[BEGIN_INIT]], -// OMP5: [[CAP1_VAL:%.+]] = load i32*, i32** [[CAP1]], -// OMP5: [[CAP2_VAL:%.+]] = load i32*, i32** [[CAP2]], -// OMP5: [[CMP:%.+]] = icmp ult i32* [[CAP1_VAL]], [[CAP2_VAL]] +// OMP5plus: store i32* [[RANGE_0]], i32** [[BEGIN_INIT]], +// OMP5plus: [[CAP1_VAL:%.+]] = load i32*, i32** [[CAP1]], +// OMP5plus: [[CAP2_VAL:%.+]] = load i32*, i32** [[CAP2]], +// OMP5plus: [[CMP:%.+]] = icmp ult i32* [[CAP1_VAL]], [[CAP2_VAL]] // __begin >= __end ? goto then : goto exit; -// OMP5: br i1 [[CMP]], label %[[THEN:.+]], label %[[EXIT:.+]] +// OMP5plus: br i1 [[CMP]], label %[[THEN:.+]], label %[[EXIT:.+]] -// OMP5: [[THEN]]: +// OMP5plus: [[THEN]]: // lb = 0; -// OMP5: store i64 0, i64* [[LB]], +// OMP5plus: store i64 0, i64* [[LB]], // ub = number of elements -// OMP5: [[NUM:%.+]] = load i64, i64* [[CAP3]], -// OMP5: store i64 [[NUM]], i64* [[UB]], +// OMP5plus: [[NUM:%.+]] = load i64, i64* [[CAP3]], +// OMP5plus: store i64 [[NUM]], i64* [[UB]], // stride = 1; -// OMP5: store i64 1, i64* [[STRIDE]], +// OMP5plus: store i64 1, i64* [[STRIDE]], // is_last = 0; -// OMP5: store i32 0, i32* [[IS_LAST]], +// OMP5plus: store i32 0, i32* [[IS_LAST]], // loop. -// OMP5: call void @__kmpc_for_static_init_8(%struct.ident_t* {{.+}}, i32 [[GTID:%.+]], i32 34, i32* [[IS_LAST]], i64* [[LB]], i64* [[UB]], i64* [[STRIDE]], i64 1, i64 1) +// OMP5plus: call void @__kmpc_for_static_init_8(%struct.ident_t* {{.+}}, i32 [[GTID:%.+]], i32 34, i32* [[IS_LAST]], i64* [[LB]], i64* [[UB]], i64* [[STRIDE]], i64 1, i64 1) // ub = (ub > number_of_elems ? number_of_elems : ub); -// OMP5: [[UB_VAL:%.+]] = load i64, i64* [[UB]], -// OMP5: [[NUM_VAL:%.+]] = load i64, i64* [[CAP3]], -// OMP5: [[CMP:%.+]] = icmp sgt i64 [[UB_VAL]], [[NUM_VAL]] -// OMP5: br i1 [[CMP]], label %[[TRUE:.+]], label %[[FALSE:.+]] +// OMP5plus: [[UB_VAL:%.+]] = load i64, i64* [[UB]], +// OMP5plus: [[NUM_VAL:%.+]] = load i64, i64* [[CAP3]], +// OMP5plus: [[CMP:%.+]] = icmp sgt i64 [[UB_VAL]], [[NUM_VAL]] +// OMP5plus: br i1 [[CMP]], label %[[TRUE:.+]], label %[[FALSE:.+]] -// OMP5: [[TRUE]]: -// OMP5: [[NUM_VAL:%.+]] = load i64, i64* [[CAP3]], -// OMP5: br label %[[END:.+]] +// OMP5plus: [[TRUE]]: +// OMP5plus: [[NUM_VAL:%.+]] = load i64, i64* [[CAP3]], +// OMP5plus: br label %[[END:.+]] -// OMP5: [[FALSE]]: -// OMP5: [[UB_VAL:%.+]] = load i64, i64* [[UB]], -// OMP5: br label %[[END:.+]] +// OMP5plus: [[FALSE]]: +// OMP5plus: [[UB_VAL:%.+]] = load i64, i64* [[UB]], +// OMP5plus: br label %[[END:.+]] -// OMP5: [[END]]: -// OMP5: [[MIN:%.+]] = phi i64 [ [[NUM_VAL]], %[[TRUE]] ], [ [[UB_VAL]], %[[FALSE]] ] +// OMP5plus: [[END]]: +// OMP5plus: [[MIN:%.+]] = phi i64 [ [[NUM_VAL]], %[[TRUE]] ], [ [[UB_VAL]], %[[FALSE]] ] // OMP%: store i64 [[MIN]], i64* [[UB]], // iv = lb; -// OMP5: [[LB_VAL:%.+]] = load i64, i64* [[LB]], -// OMP5: store i64 [[LB_VAL]], i64* [[IV]], +// OMP5plus: [[LB_VAL:%.+]] = load i64, i64* [[LB]], +// OMP5plus: store i64 [[LB_VAL]], i64* [[IV]], // goto loop; // loop: -// OMP5: br label %[[LOOP:.+]] +// OMP5plus: br label %[[LOOP:.+]] -// OMP5: [[LOOP]]: +// OMP5plus: [[LOOP]]: // iv <= ub ? goto body : goto end; -// OMP5: [[IV_VAL:%.+]] = load i64, i64* [[IV]], -// OMP5: [[UB_VAL:%.+]] = load i64, i64* [[UB]], -// OMP5: [[CMP:%.+]] = icmp sle i64 [[IV_VAL]], [[UB_VAL]] -// OMP5: br i1 [[CMP]], label %[[BODY:.+]], label %[[END:.+]] +// OMP5plus: [[IV_VAL:%.+]] = load i64, i64* [[IV]], +// OMP5plus: [[UB_VAL:%.+]] = load i64, i64* [[UB]], +// OMP5plus: [[CMP:%.+]] = icmp sle i64 [[IV_VAL]], [[UB_VAL]] +// OMP5plus: br i1 [[CMP]], label %[[BODY:.+]], label %[[END:.+]] // body: // __begin = begin(arr) + iv * 1; -// OMP5: [[BODY]]: -// OMP5: [[CAP1_VAL:%.+]] = load i32*, i32** [[CAP1]], -// OMP5: [[IV_VAL:%.+]] = load i64, i64* [[IV]], -// OMP5: [[MUL:%.+]] = mul nsw i64 [[IV_VAL]], 1 -// OMP5: [[ADDR:%.+]] = getelementptr inbounds i32, i32* [[CAP1_VAL]], i64 [[MUL]] -// OMP5: store i32* [[ADDR]], i32** [[BEGIN]], +// OMP5plus: [[BODY]]: +// OMP5plus: [[CAP1_VAL:%.+]] = load i32*, i32** [[CAP1]], +// OMP5plus: [[IV_VAL:%.+]] = load i64, i64* [[IV]], +// OMP5plus: [[MUL:%.+]] = mul nsw i64 [[IV_VAL]], 1 +// OMP5plus: [[ADDR:%.+]] = getelementptr inbounds i32, i32* [[CAP1_VAL]], i64 [[MUL]] +// OMP5plus: store i32* [[ADDR]], i32** [[BEGIN]], // a = *__begin; -// OMP5: [[BEGIN_VAL:%.+]] = load i32*, i32** [[BEGIN]], -// OMP5: store i32* [[BEGIN_VAL]], i32** [[A_PTR]], +// OMP5plus: [[BEGIN_VAL:%.+]] = load i32*, i32** [[BEGIN]], +// OMP5plus: store i32* [[BEGIN_VAL]], i32** [[A_PTR]], // (void)a; -// OMP5: load i32*, i32** [[A_PTR]], +// OMP5plus: load i32*, i32** [[A_PTR]], // iv += 1; -// OMP5: [[IV_VAL:%.+]] = load i64, i64* [[IV]], -// OMP5: [[IV_VAL_ADD_1:%.+]] = add nsw i64 [[IV_VAL]], 1 -// OMP5: store i64 [[IV_VAL_ADD_1]], i64* [[IV]], +// OMP5plus: [[IV_VAL:%.+]] = load i64, i64* [[IV]], +// OMP5plus: [[IV_VAL_ADD_1:%.+]] = add nsw i64 [[IV_VAL]], 1 +// OMP5plus: store i64 [[IV_VAL_ADD_1]], i64* [[IV]], // goto loop; -// OMP5: br label %[[LOOP]] +// OMP5plus: br label %[[LOOP]] // end: -// OMP5: [[END]]: -// OMP5: call void @__kmpc_for_static_fini(%struct.ident_t* {{.+}}, i32 [[GTID:%.+]]) +// OMP5plus: [[END]]: +// OMP5plus: call void @__kmpc_for_static_fini(%struct.ident_t* {{.+}}, i32 [[GTID:%.+]]) // exit: -// OMP5: [[EXIT]]: -// OMP5: ret void +// OMP5plus: [[EXIT]]: +// OMP5plus: ret void -// OMP5-LABEL: range_for_collapsed +// OMP5plus-LABEL: range_for_collapsed void range_for_collapsed() { int arr[10] = {0}; -// OMP5: call void @__kmpc_for_static_init_8(%struct.ident_t* {{.+}}, i32 [[GTID:%.+]], i32 34, i32* %{{.+}}, i64* %{{.+}}, i64* %{{.+}}, i64* %{{.+}}, i64 1, i64 1) +// OMP5plus: call void @__kmpc_for_static_init_8(%struct.ident_t* {{.+}}, i32 [[GTID:%.+]], i32 34, i32* %{{.+}}, i64* %{{.+}}, i64* %{{.+}}, i64* %{{.+}}, i64 1, i64 1) #pragma omp parallel for collapse(2) for (auto &a : arr) for (auto b : arr) a = b; -// OMP5: call void @__kmpc_for_static_fini(%struct.ident_t* {{.+}}, i32 [[GTID:%.+]]) +// OMP5plus: call void @__kmpc_for_static_fini(%struct.ident_t* {{.+}}, i32 [[GTID:%.+]]) } -#endif // OMP5 +#endif // OMP5plus #endif // HEADER diff --git a/clang/test/OpenMP/parallel_for_loop_messages.cpp b/clang/test/OpenMP/parallel_for_loop_messages.cpp --- a/clang/test/OpenMP/parallel_for_loop_messages.cpp +++ b/clang/test/OpenMP/parallel_for_loop_messages.cpp @@ -4,6 +4,14 @@ // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp4 %s -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=50 -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wuninitialized + +// +// Additional tests without version string. To be updated with each OpenMP version change in case of changed behaviour. +// + +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wuninitialized +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wuninitialized + class S { int a; S() : a(0) {} diff --git a/clang/test/OpenMP/parallel_for_simd_loop_messages.cpp b/clang/test/OpenMP/parallel_for_simd_loop_messages.cpp --- a/clang/test/OpenMP/parallel_for_simd_loop_messages.cpp +++ b/clang/test/OpenMP/parallel_for_simd_loop_messages.cpp @@ -4,6 +4,13 @@ // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp4 %s -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=50 -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wuninitialized +// +// Additional tests without version string. To be updated with each OpenMP version change in case of changed behaviour. +// + +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wuninitialized +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wuninitialized + class S { int a; S() : a(0) {} diff --git a/clang/test/OpenMP/parallel_master_taskloop_loop_messages.cpp b/clang/test/OpenMP/parallel_master_taskloop_loop_messages.cpp --- a/clang/test/OpenMP/parallel_master_taskloop_loop_messages.cpp +++ b/clang/test/OpenMP/parallel_master_taskloop_loop_messages.cpp @@ -4,6 +4,13 @@ // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp4 %s -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=50 -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wuninitialized +// +// Additional tests without version string. To be updated with each OpenMP version change in case of changed behaviour. +// + +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wuninitialized +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wuninitialized + class S { int a; S() : a(0) {} diff --git a/clang/test/OpenMP/parallel_master_taskloop_simd_loop_messages.cpp b/clang/test/OpenMP/parallel_master_taskloop_simd_loop_messages.cpp --- a/clang/test/OpenMP/parallel_master_taskloop_simd_loop_messages.cpp +++ b/clang/test/OpenMP/parallel_master_taskloop_simd_loop_messages.cpp @@ -4,6 +4,13 @@ // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp4 %s -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=50 -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wuninitialized +// +// Additional tests without version string. To be updated with each OpenMP version change in case of changed behaviour. +// + +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wuninitialized +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wuninitialized + class S { int a; S() : a(0) {} diff --git a/clang/test/OpenMP/simd_loop_messages.cpp b/clang/test/OpenMP/simd_loop_messages.cpp --- a/clang/test/OpenMP/simd_loop_messages.cpp +++ b/clang/test/OpenMP/simd_loop_messages.cpp @@ -1,10 +1,18 @@ // RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=45 -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp4,expectedw %s -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp4,expectedw %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5,expectedw %s -fopenmp-version=50 -DOMP50 -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5,expectedw %s -fopenmp-version=50 -DOMP50 -Wuninitialized +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5,expectedw %s -fopenmp-version=50 -DOMP5plus -Wuninitialized + +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5,expectedw %s -fopenmp-version=50 -DOMP5plus -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=45 -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp4 %s -Wuninitialized -Wno-openmp-loop-form // RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=45 -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp4 %s -Wuninitialized -Wno-openmp +// +// Additional tests without version string. To be updated with each OpenMP version change in case of changed behaviour. +// + +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5,expectedw %s -DOMP5plus -Wuninitialized +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5,expectedw %s -DOMP5plus -Wuninitialized + static int sii; // expected-note@+1 {{defined as threadprivate or thread local}} #pragma omp threadprivate(sii) @@ -248,18 +256,18 @@ for (ii = 0; (ii < 10); (ii-=0)) c[ii] = a[ii]; -#ifndef OMP50 +#ifndef OMP5plus // expected-note@+3 {{defined as private}} // expected-error@+3 {{loop iteration variable in the associated loop of 'omp simd' directive may not be private, predetermined as linear}} -#endif // OMP50 +#endif // OMP5plus #pragma omp simd private(ii) for (ii = 0; ii < 10; ii++) c[ii] = a[ii]; -#ifndef OMP50 +#ifndef OMP5plus // expected-note@+3 {{defined as lastprivate}} // expected-error@+3 {{loop iteration variable in the associated loop of 'omp simd' directive may not be lastprivate, predetermined as linear}} -#endif // OMP50 +#endif // OMP5plus #pragma omp simd lastprivate(ii) for (ii = 0; ii < 10; ii++) c[ii] = a[ii]; diff --git a/clang/test/OpenMP/target_depend_messages.cpp b/clang/test/OpenMP/target_depend_messages.cpp --- a/clang/test/OpenMP/target_depend_messages.cpp +++ b/clang/test/OpenMP/target_depend_messages.cpp @@ -4,6 +4,13 @@ // RUN: %clang_cc1 -verify=expected,omp4 -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized // RUN: %clang_cc1 -verify=expected,omp5 -fopenmp-simd -fopenmp-version=50 -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized +// +// Additional tests without version string. To be updated with each OpenMP version change in case of changed behaviour. +// + +// RUN: %clang_cc1 -verify=expected,omp5 -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized +// RUN: %clang_cc1 -verify=expected,omp5 -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized + void xxx(int argc) { int x; // expected-note {{initialize the variable 'x' to silence this warning}} #pragma omp target depend(in : argc) diff --git a/clang/test/OpenMP/target_enter_data_depend_messages.cpp b/clang/test/OpenMP/target_enter_data_depend_messages.cpp --- a/clang/test/OpenMP/target_enter_data_depend_messages.cpp +++ b/clang/test/OpenMP/target_enter_data_depend_messages.cpp @@ -4,6 +4,13 @@ // RUN: %clang_cc1 -verify=expected,omp4 -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized // RUN: %clang_cc1 -verify=expected,omp5 -fopenmp-simd -fopenmp-version=50 -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized +// +// Additional tests without version string. To be updated with each OpenMP version change in case of changed behaviour. +// + +// RUN: %clang_cc1 -verify=expected,omp5 -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized +// RUN: %clang_cc1 -verify=expected,omp5 -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized + void foo() { } diff --git a/clang/test/OpenMP/target_exit_data_depend_messages.cpp b/clang/test/OpenMP/target_exit_data_depend_messages.cpp --- a/clang/test/OpenMP/target_exit_data_depend_messages.cpp +++ b/clang/test/OpenMP/target_exit_data_depend_messages.cpp @@ -4,6 +4,13 @@ // RUN: %clang_cc1 -verify=expected,omp4 -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized // RUN: %clang_cc1 -verify=expected,omp5 -fopenmp-simd -fopenmp-version=50 -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized +// +// Additional tests without version string. To be updated with each OpenMP version change in case of changed behaviour. +// + +// RUN: %clang_cc1 -verify=expected,omp5 -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized +// RUN: %clang_cc1 -verify=expected,omp5 -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized + void foo() { } diff --git a/clang/test/OpenMP/target_map_codegen.cpp b/clang/test/OpenMP/target_map_codegen.cpp --- a/clang/test/OpenMP/target_map_codegen.cpp +++ b/clang/test/OpenMP/target_map_codegen.cpp @@ -5369,6 +5369,25 @@ // RUN: %clang_cc1 -DCK32 -fopenmp-simd -fopenmp-version=50 -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s // RUN: %clang_cc1 -fopenmp-simd -fopenmp-version=50 -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY32 %s // SIMD-ONLY32-NOT: {{__kmpc|__tgt}} + +// +// Additional tests without version string. To be updated with each OpenMP version change in case of changed behaviour. +// + +// RUN: %clang_cc1 -DCK32 -verify -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK32 --check-prefix CK32-64 +// RUN: %clang_cc1 -DCK32 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s +// RUN: %clang_cc1 -fopenmp -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix CK32 --check-prefix CK32-64 +// RUN: %clang_cc1 -DCK32 -verify -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefix CK32 --check-prefix CK32-32 +// RUN: %clang_cc1 -DCK32 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s +// RUN: %clang_cc1 -fopenmp -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s --check-prefix CK32 --check-prefix CK32-32 + +// RUN: %clang_cc1 -DCK32 -verify -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY32 %s +// RUN: %clang_cc1 -DCK32 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -emit-pch -o %t %s +// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=powerpc64le-ibm-linux-gnu -x c++ -triple powerpc64le-unknown-unknown -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY32 %s +// RUN: %clang_cc1 -DCK32 -verify -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY32 %s +// RUN: %clang_cc1 -DCK32 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -std=c++11 -triple i386-unknown-unknown -emit-pch -o %t %s +// RUN: %clang_cc1 -fopenmp-simd -fopenmp-targets=i386-pc-linux-gnu -x c++ -triple i386-unknown-unknown -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY32 %s + #ifdef CK32 // CK32-DAG: [[MTYPE_TO:@.+]] = {{.+}}constant [1 x i64] [i64 33] diff --git a/clang/test/OpenMP/target_map_messages.cpp b/clang/test/OpenMP/target_map_messages.cpp --- a/clang/test/OpenMP/target_map_messages.cpp +++ b/clang/test/OpenMP/target_map_messages.cpp @@ -9,6 +9,14 @@ // RUN: %clang_cc1 -verify=expected,le45 -fopenmp-simd -fopenmp-version=45 -ferror-limit 200 %s -Wno-openmp-target -Wuninitialized // RUN: %clang_cc1 -verify=expected,le50 -fopenmp-simd -fopenmp-version=50 -ferror-limit 200 %s -Wno-openmp-target -Wuninitialized // RUN: %clang_cc1 -DCCODE -verify -fopenmp-simd -ferror-limit 200 -x c %s -Wno-openmp-mapping -Wuninitialized + +// +// Additional tests without version string. To be updated with each OpenMP version change in case of changed behaviour. +// + +// RUN: %clang_cc1 -verify=expected,le50 -fopenmp -ferror-limit 200 %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify=expected,le50 -fopenmp-simd -ferror-limit 200 %s -Wno-openmp-target -Wuninitialized + #ifdef CCODE void foo(int arg) { const int n = 0; diff --git a/clang/test/OpenMP/target_messages.cpp b/clang/test/OpenMP/target_messages.cpp --- a/clang/test/OpenMP/target_messages.cpp +++ b/clang/test/OpenMP/target_messages.cpp @@ -1,10 +1,12 @@ // RUN: %clang_cc1 -verify=expected,omp4 -fopenmp -fopenmp-version=45 -std=c++11 -o - %s // RUN: %clang_cc1 -verify=expected,omp5 -fopenmp -fopenmp-version=50 -o - -std=c++11 %s -Wuninitialized +// RUN: %clang_cc1 -verify=expected,omp5 -fopenmp -o - -std=c++11 %s -Wuninitialized // RUN: not %clang_cc1 -fopenmp -std=c++11 -fopenmp-targets=aaa-bbb-ccc-ddd -o - %s 2>&1 | FileCheck %s // RUN: %clang_cc1 -verify=expected,omp4 -fopenmp-simd -fopenmp-version=45 -std=c++11 -o - %s // RUN: %clang_cc1 -verify=expected,omp5 -fopenmp-simd -fopenmp-version=50 -std=c++11 -o - %s +// RUN: %clang_cc1 -verify=expected,omp5 -fopenmp-simd -std=c++11 -o - %s // CHECK: error: OpenMP target is invalid: 'aaa-bbb-ccc-ddd' // RUN: not %clang_cc1 -fopenmp -std=c++11 -triple nvptx64-nvidia-cuda -o - %s 2>&1 | FileCheck --check-prefix CHECK-UNSUPPORTED-HOST-TARGET %s // RUN: not %clang_cc1 -fopenmp -std=c++11 -triple nvptx-nvidia-cuda -o - %s 2>&1 | FileCheck --check-prefix CHECK-UNSUPPORTED-HOST-TARGET %s @@ -18,6 +20,7 @@ // RUN: %clang_cc1 -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm-bc %s -o %t-ppc-host.bc -DREGION_HOST // RUN: not %clang_cc1 -verify=expected,omp4 -fopenmp -fopenmp-version=45 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - -DREGION_DEVICE 2>&1 // RUN: not %clang_cc1 -verify=expected,omp5 -fopenmp -fopenmp-version=50 -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - -DREGION_DEVICE 2>&1 +// RUN: not %clang_cc1 -verify=expected,omp5 -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - -DREGION_DEVICE 2>&1 #if defined(REGION_HOST) || defined(REGION_DEVICE) void foo() { diff --git a/clang/test/OpenMP/target_parallel_for_loop_messages.cpp b/clang/test/OpenMP/target_parallel_for_loop_messages.cpp --- a/clang/test/OpenMP/target_parallel_for_loop_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_loop_messages.cpp @@ -4,6 +4,13 @@ // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp4 %s -Wno-openmp-mapping -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=50 -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wno-openmp-mapping -Wuninitialized +// +// Additional tests without version string. To be updated with each OpenMP version change in case of changed behaviour. +// + +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wno-openmp-mapping -Wuninitialized +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wno-openmp-mapping -Wuninitialized + class S { int a; S() : a(0) {} diff --git a/clang/test/OpenMP/target_teams_distribute_loop_messages.cpp b/clang/test/OpenMP/target_teams_distribute_loop_messages.cpp --- a/clang/test/OpenMP/target_teams_distribute_loop_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_loop_messages.cpp @@ -4,6 +4,13 @@ // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp4 %s -Wno-openmp-mapping -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=50 -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wno-openmp-mapping -Wuninitialized +// +// Additional tests without version string. To be updated with each OpenMP version change in case of changed behaviour. +// + +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wno-openmp-mapping -Wuninitialized +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wno-openmp-mapping -Wuninitialized + class S { int a; S() : a(0) {} // expected-note {{implicitly declared private here}} diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_lastprivate_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_lastprivate_messages.cpp --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_lastprivate_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_lastprivate_messages.cpp @@ -5,6 +5,7 @@ // RUN: %clang_cc1 -verify=expected,le45 -fopenmp-version=45 -fopenmp-simd %s -Wuninitialized // RUN: %clang_cc1 -verify=expected,omp50 -fopenmp-version=50 -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify=expected,omp50 -fopenmp-simd %s -Wuninitialized #pragma omp requires dynamic_allocators typedef void **omp_allocator_handle_t; diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_loop_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_loop_messages.cpp --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_loop_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_loop_messages.cpp @@ -4,6 +4,13 @@ // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp4 %s -Wno-openmp-mapping -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=50 -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wno-openmp-mapping -Wuninitialized +// +// Additional tests without version string. To be updated with each OpenMP version change in case of changed behaviour. +// + +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wno-openmp-mapping -Wuninitialized +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wno-openmp-mapping -Wuninitialized + class S { int a; S() : a(0) {} // expected-note {{implicitly declared private here}} diff --git a/clang/test/OpenMP/taskloop_loop_messages.cpp b/clang/test/OpenMP/taskloop_loop_messages.cpp --- a/clang/test/OpenMP/taskloop_loop_messages.cpp +++ b/clang/test/OpenMP/taskloop_loop_messages.cpp @@ -4,6 +4,13 @@ // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp4 %s -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=50 -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wuninitialized +// +// Additional tests without version string. To be updated with each OpenMP version change in case of changed behaviour. +// + +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wuninitialized +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wuninitialized + class S { int a; S() : a(0) {} diff --git a/clang/test/OpenMP/taskloop_simd_loop_messages.cpp b/clang/test/OpenMP/taskloop_simd_loop_messages.cpp --- a/clang/test/OpenMP/taskloop_simd_loop_messages.cpp +++ b/clang/test/OpenMP/taskloop_simd_loop_messages.cpp @@ -4,6 +4,13 @@ // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp4 %s -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=50 -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wuninitialized +// +// Additional tests without version string. To be updated with each OpenMP version change in case of changed behaviour. +// + +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wuninitialized +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wuninitialized + class S { int a; S() : a(0) {} diff --git a/clang/test/OpenMP/teams_distribute_loop_messages.cpp b/clang/test/OpenMP/teams_distribute_loop_messages.cpp --- a/clang/test/OpenMP/teams_distribute_loop_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_loop_messages.cpp @@ -4,6 +4,13 @@ // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp4 %s -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=50 -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wuninitialized +// +// Additional tests without version string. To be updated with each OpenMP version change in case of changed behaviour. +// + +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wuninitialized +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wuninitialized + class S { int a; S() : a(0) {} // expected-note {{implicitly declared private here}} diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_loop_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_loop_messages.cpp --- a/clang/test/OpenMP/teams_distribute_parallel_for_loop_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_loop_messages.cpp @@ -4,6 +4,13 @@ // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp4 %s -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=50 -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wuninitialized +// +// Additional tests without version string. To be updated with each OpenMP version change in case of changed behaviour. +// + +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wuninitialized +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wuninitialized + class S { int a; S() : a(0) {} // expected-note {{implicitly declared private here}} diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_simd_loop_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_simd_loop_messages.cpp --- a/clang/test/OpenMP/teams_distribute_parallel_for_simd_loop_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_simd_loop_messages.cpp @@ -4,6 +4,13 @@ // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp4 %s -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=50 -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wuninitialized +// +// Additional tests without version string. To be updated with each OpenMP version change in case of changed behaviour. +// + +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wuninitialized +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wuninitialized + class S { int a; S() : a(0) {} // expected-note {{implicitly declared private here}} diff --git a/clang/test/OpenMP/teams_distribute_simd_loop_messages.cpp b/clang/test/OpenMP/teams_distribute_simd_loop_messages.cpp --- a/clang/test/OpenMP/teams_distribute_simd_loop_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_simd_loop_messages.cpp @@ -4,6 +4,13 @@ // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=45 -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp4 %s -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=50 -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wuninitialized +// +// Additional tests without version string. To be updated with each OpenMP version change in case of changed behaviour. +// + +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wuninitialized +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify=expected,omp5 %s -Wuninitialized + class S { int a; S() : a(0) {} // expected-note {{implicitly declared private here}} diff --git a/clang/test/OpenMP/teams_messages.cpp b/clang/test/OpenMP/teams_messages.cpp --- a/clang/test/OpenMP/teams_messages.cpp +++ b/clang/test/OpenMP/teams_messages.cpp @@ -4,6 +4,13 @@ // RUN: %clang_cc1 -verify=expected,omp45 -fopenmp-version=45 -fopenmp-simd -std=c++11 -o - %s -Wuninitialized // RUN: %clang_cc1 -verify -fopenmp-version=50 -fopenmp-simd -std=c++11 -o - %s -Wuninitialized +// +// Additional tests without version string. To be updated with each OpenMP version change in case of changed behaviour. +// + +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s -Wuninitialized + void xxx(int argc) { int x; // expected-note {{initialize the variable 'x' to silence this warning}} #pragma omp target