From caacd53dde6ea46d03abf272aa996957433ce31d Mon Sep 17 00:00:00 2001 From: Alexey Bataev Date: Fri, 4 Sep 2015 11:26:21 +0000 Subject: [OPENMP] Fix for http://llvm.org/PR24674: assertion failed and and abort trap Fix processing of shared variables with reference types in OpenMP constructs. Previously, if the variable was not marked in one of the private clauses, the reference to this variable was emitted incorrectly and caused an assertion later. llvm-svn: 246846 --- clang/test/OpenMP/simd_codegen.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'clang/test/OpenMP/simd_codegen.cpp') diff --git a/clang/test/OpenMP/simd_codegen.cpp b/clang/test/OpenMP/simd_codegen.cpp index bea46479274..0db371edfb5 100644 --- a/clang/test/OpenMP/simd_codegen.cpp +++ b/clang/test/OpenMP/simd_codegen.cpp @@ -525,8 +525,10 @@ void linear(float *a) { // // Update linear vars after loop, as the loop was operating on a private version. // CHECK: [[K_REF:%.+]] = load i64*, i64** [[K_ADDR]], +// CHECK: store i64* [[K_REF]], i64** [[K_PRIV_REF:%.+]], // CHECK: [[LIN0_2:%.+]] = load i64, i64* [[LIN0]] // CHECK-NEXT: [[LIN_ADD2:%.+]] = add nsw i64 [[LIN0_2]], 27 +// CHECK-NEXT: [[K_REF:%.+]] = load i64*, i64** [[K_PRIV_REF]], // CHECK-NEXT: store i64 [[LIN_ADD2]], i64* [[K_REF]] // @@ -566,8 +568,10 @@ void linear(float *a) { // // Update linear vars after loop, as the loop was operating on a private version. // CHECK: [[K_REF:%.+]] = load i64*, i64** [[K_ADDR]], +// CHECK: store i64* [[K_REF]], i64** [[K_PRIV_REF:%.+]], // CHECK: [[LIN0_2:%.+]] = load i64, i64* [[LIN0]] // CHECK-NEXT: [[LIN_ADD2:%.+]] = add nsw i64 [[LIN0_2]], 27 +// CHECK-NEXT: [[K_REF:%.+]] = load i64*, i64** [[K_PRIV_REF]], // CHECK-NEXT: store i64 [[LIN_ADD2]], i64* [[K_REF]] // #pragma omp simd linear(uval(k) : 3) -- cgit v1.2.3