diff options
Diffstat (limited to 'test/OpenMP/parallel_sections_ast_print.cpp')
| -rw-r--r-- | test/OpenMP/parallel_sections_ast_print.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/test/OpenMP/parallel_sections_ast_print.cpp b/test/OpenMP/parallel_sections_ast_print.cpp index a66b75ea6d79..da3bd48201a0 100644 --- a/test/OpenMP/parallel_sections_ast_print.cpp +++ b/test/OpenMP/parallel_sections_ast_print.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ast-print %s | FileCheck %s -// RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -emit-pch -o %t %s -// RUN: %clang_cc1 -fopenmp -std=c++11 -include-pch %t -fsyntax-only -verify %s -ast-print | FileCheck %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ast-print %s | FileCheck %s +// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -x c++ -std=c++11 -emit-pch -o %t %s +// RUN: %clang_cc1 -fopenmp -fopenmp-version=45 -std=c++11 -include-pch %t -fsyntax-only -verify %s -ast-print | FileCheck %s // expected-no-diagnostics #ifndef HEADER @@ -15,18 +15,18 @@ struct S { #pragma omp threadprivate(TS) }; -// CHECK: template <class T = int> struct S { +// CHECK: template <class T> struct S { +// CHECK: static T TS; +// CHECK-NEXT: #pragma omp threadprivate(S::TS) +// CHECK: }; +// CHECK: template<> struct S<int> { // CHECK: static int TS; // CHECK-NEXT: #pragma omp threadprivate(S<int>::TS) // CHECK-NEXT: } -// CHECK: template <class T = long> struct S { +// CHECK: template<> struct S<long> { // CHECK: static long TS; // CHECK-NEXT: #pragma omp threadprivate(S<long>::TS) // CHECK-NEXT: } -// CHECK: template <class T> struct S { -// CHECK: static T TS; -// CHECK-NEXT: #pragma omp threadprivate(S::TS) -// CHECK: }; template <typename T, int C> T tmain(T argc, T *argv) { @@ -50,55 +50,55 @@ T tmain(T argc, T *argv) { return 0; } -// CHECK: template <typename T = int, int C = 5> int tmain(int argc, int *argv) { -// CHECK-NEXT: int b = argc, c, d, e, f, g; -// CHECK-NEXT: static int a; -// CHECK-NEXT: S<int> s; +// CHECK: template <typename T, int C> T tmain(T argc, T *argv) { +// CHECK-NEXT: T b = argc, c, d, e, f, g; +// CHECK-NEXT: static T a; +// CHECK-NEXT: S<T> s; // CHECK-NEXT: #pragma omp parallel sections // CHECK-NEXT: { // CHECK-NEXT: a = 2; // CHECK-NEXT: } -// CHECK-NEXT: #pragma omp parallel sections default(none) private(argc,b) firstprivate(argv) shared(d) if(parallel: argc > 0) num_threads(5) copyin(S<int>::TS) proc_bind(master) reduction(+: c) reduction(max: e) +// CHECK-NEXT: #pragma omp parallel sections default(none) private(argc,b) firstprivate(argv) shared(d) if(parallel: argc > 0) num_threads(C) copyin(S<T>::TS) proc_bind(master) reduction(+: c) reduction(max: e) // CHECK-NEXT: { // CHECK-NEXT: foo(); // CHECK-NEXT: } -// CHECK-NEXT: #pragma omp parallel sections if(5) num_threads(s) proc_bind(close) reduction(^: e,f) reduction(&&: g) lastprivate(b,c) +// CHECK-NEXT: #pragma omp parallel sections if(C) num_threads(s) proc_bind(close) reduction(^: e,f) reduction(&&: g) lastprivate(b,c) // CHECK-NEXT: { // CHECK-NEXT: foo(); // CHECK-NEXT: #pragma omp section // CHECK-NEXT: foo(); // CHECK-NEXT: } -// CHECK: template <typename T = long, int C = 1> long tmain(long argc, long *argv) { -// CHECK-NEXT: long b = argc, c, d, e, f, g; -// CHECK-NEXT: static long a; -// CHECK-NEXT: S<long> s; +// CHECK: template<> int tmain<int, 5>(int argc, int *argv) { +// CHECK-NEXT: int b = argc, c, d, e, f, g; +// CHECK-NEXT: static int a; +// CHECK-NEXT: S<int> s; // CHECK-NEXT: #pragma omp parallel sections // CHECK-NEXT: { // CHECK-NEXT: a = 2; // CHECK-NEXT: } -// CHECK-NEXT: #pragma omp parallel sections default(none) private(argc,b) firstprivate(argv) shared(d) if(parallel: argc > 0) num_threads(1) copyin(S<long>::TS) proc_bind(master) reduction(+: c) reduction(max: e) +// CHECK-NEXT: #pragma omp parallel sections default(none) private(argc,b) firstprivate(argv) shared(d) if(parallel: argc > 0) num_threads(5) copyin(S<int>::TS) proc_bind(master) reduction(+: c) reduction(max: e) // CHECK-NEXT: { // CHECK-NEXT: foo(); // CHECK-NEXT: } -// CHECK-NEXT: #pragma omp parallel sections if(1) num_threads(s) proc_bind(close) reduction(^: e,f) reduction(&&: g) lastprivate(b,c) +// CHECK-NEXT: #pragma omp parallel sections if(5) num_threads(s) proc_bind(close) reduction(^: e,f) reduction(&&: g) lastprivate(b,c) // CHECK-NEXT: { // CHECK-NEXT: foo(); // CHECK-NEXT: #pragma omp section // CHECK-NEXT: foo(); // CHECK-NEXT: } -// CHECK: template <typename T, int C> T tmain(T argc, T *argv) { -// CHECK-NEXT: T b = argc, c, d, e, f, g; -// CHECK-NEXT: static T a; -// CHECK-NEXT: S<T> s; +// CHECK: template<> long tmain<long, 1>(long argc, long *argv) { +// CHECK-NEXT: long b = argc, c, d, e, f, g; +// CHECK-NEXT: static long a; +// CHECK-NEXT: S<long> s; // CHECK-NEXT: #pragma omp parallel sections // CHECK-NEXT: { // CHECK-NEXT: a = 2; // CHECK-NEXT: } -// CHECK-NEXT: #pragma omp parallel sections default(none) private(argc,b) firstprivate(argv) shared(d) if(parallel: argc > 0) num_threads(C) copyin(S<T>::TS) proc_bind(master) reduction(+: c) reduction(max: e) +// CHECK-NEXT: #pragma omp parallel sections default(none) private(argc,b) firstprivate(argv) shared(d) if(parallel: argc > 0) num_threads(1) copyin(S<long>::TS) proc_bind(master) reduction(+: c) reduction(max: e) // CHECK-NEXT: { // CHECK-NEXT: foo(); // CHECK-NEXT: } -// CHECK-NEXT: #pragma omp parallel sections if(C) num_threads(s) proc_bind(close) reduction(^: e,f) reduction(&&: g) lastprivate(b,c) +// CHECK-NEXT: #pragma omp parallel sections if(1) num_threads(s) proc_bind(close) reduction(^: e,f) reduction(&&: g) lastprivate(b,c) // CHECK-NEXT: { // CHECK-NEXT: foo(); // CHECK-NEXT: #pragma omp section |
