diff options
Diffstat (limited to 'clang/lib/CodeGen/CGOpenMPRuntime.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGOpenMPRuntime.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGOpenMPRuntime.cpp b/clang/lib/CodeGen/CGOpenMPRuntime.cpp index f9dab90f398..708f0abd08d 100644 --- a/clang/lib/CodeGen/CGOpenMPRuntime.cpp +++ b/clang/lib/CodeGen/CGOpenMPRuntime.cpp @@ -5422,6 +5422,9 @@ static llvm::Value *emitReduceInitFunction(CodeGenModule &CGM, CGM.getOpenMPRuntime().getAddrOfArtificialThreadPrivate( CGF, CGM.getContext().VoidPtrTy, generateUniqueName(CGM, "reduction", RCG.getRefExpr(N))); + SharedAddr = CGF.EmitLoadOfPointer( + SharedAddr, + CGM.getContext().VoidPtrTy.castAs<PointerType>()->getTypePtr()); SharedLVal = CGF.MakeAddrLValue(SharedAddr, CGM.getContext().VoidPtrTy); } else { SharedLVal = CGF.MakeNaturalAlignAddrLValue( |