diff options
| author | Alexey Bataev <a.bataev@hotmail.com> | 2019-03-27 14:14:31 +0000 |
|---|---|---|
| committer | Alexey Bataev <a.bataev@hotmail.com> | 2019-03-27 14:14:31 +0000 |
| commit | e04483ee35ba28c089cbbcec97a96b67ce0a035e (patch) | |
| tree | 2d8d61dc09988f868e824140f5c9bdfa3cd8df31 /clang/test/OpenMP/target_teams_distribute_reduction_messages.cpp | |
| parent | 5c0d7a24e8e5a1aa9632832b65157e62a6d4b553 (diff) | |
| download | bcm5719-llvm-e04483ee35ba28c089cbbcec97a96b67ce0a035e.tar.gz bcm5719-llvm-e04483ee35ba28c089cbbcec97a96b67ce0a035e.zip | |
[OPENMP]Initial support for 'allocate' clause.
Added parsing/sema analysis of the allocate clause.
llvm-svn: 357068
Diffstat (limited to 'clang/test/OpenMP/target_teams_distribute_reduction_messages.cpp')
| -rw-r--r-- | clang/test/OpenMP/target_teams_distribute_reduction_messages.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/test/OpenMP/target_teams_distribute_reduction_messages.cpp b/clang/test/OpenMP/target_teams_distribute_reduction_messages.cpp index 6a9e6782f6c..6c245f1f282 100644 --- a/clang/test/OpenMP/target_teams_distribute_reduction_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_reduction_messages.cpp @@ -6,6 +6,7 @@ // RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s // RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +extern int omp_default_mem_alloc; void foo() { } @@ -112,7 +113,7 @@ T tmain(T argc) { for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute reduction(foo : argc) //expected-error {{incorrect reduction identifier, expected one of '+', '-', '*', '&', '|', '^', '&&', '||', 'min' or 'max' or declare reduction for type 'float'}} expected-error {{incorrect reduction identifier, expected one of '+', '-', '*', '&', '|', '^', '&&', '||', 'min' or 'max' or declare reduction for type 'int'}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute reduction(&& : argc) +#pragma omp target teams distribute reduction(&& : argc) allocate , allocate(, allocate(omp_default , allocate(omp_default_mem_alloc, allocate(omp_default_mem_alloc:, allocate(omp_default_mem_alloc: argc, allocate(omp_default_mem_alloc: argv), allocate(argv) // expected-error {{expected '(' after 'allocate'}} expected-error 2 {{expected expression}} expected-error 2 {{expected ')'}} expected-error {{use of undeclared identifier 'omp_default'}} expected-note 2 {{to match this '('}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute reduction(^ : T) // expected-error {{'T' does not refer to a value}} for (int j=0; j<100; j++) foo(); |

