diff options
author | Tom Stellard <tstellar@redhat.com> | 2017-11-14 00:00:35 +0000 |
---|---|---|
committer | Tom Stellard <tstellar@redhat.com> | 2017-11-14 00:00:35 +0000 |
commit | 519b352e25c984a9807af3f29114e537c9352ff3 (patch) | |
tree | dbc44a6f3e16960e1af69393a7416ca46a0a9be6 /test | |
parent | 4958d4c0de2f137e6dc83a9efccaa84433091051 (diff) |
Merging r315586:
------------------------------------------------------------------------
r315586 | abataev | 2017-10-12 08:18:41 -0700 (Thu, 12 Oct 2017) | 5 lines
[OPENMP] Fix PR34926: Fix handling of the array sections passed as
function params.
Codegen could crash if the array section base expression is the
function parameter.
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_50@318118 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/OpenMP/parallel_reduction_codegen.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/OpenMP/parallel_reduction_codegen.cpp b/test/OpenMP/parallel_reduction_codegen.cpp index e42776c740..c4c0ff473a 100644 --- a/test/OpenMP/parallel_reduction_codegen.cpp +++ b/test/OpenMP/parallel_reduction_codegen.cpp @@ -80,6 +80,14 @@ struct SST { // CHECK-DAG: [[REDUCTION_LOC:@.+]] = private unnamed_addr constant %{{.+}} { i32 0, i32 18, i32 0, i32 0, i8* // CHECK-DAG: [[REDUCTION_LOCK:@.+]] = common global [8 x i32] zeroinitializer +//CHECK: foo_array_sect +//CHECK: call void {{.+}}@__kmpc_fork_call( +//CHECK: ret void +void foo_array_sect(short x[1]) { +#pragma omp parallel reduction(+ : x[:]) + {} +} + template <typename T> T tmain() { T t; |