summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGStmtOpenMP.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2019-06-25 16:00:43 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2019-06-25 16:00:43 +0000
commita90fc6617fb5df0d07956d08cbc300dca5924680 (patch)
tree67540fdfea61b0c363ca79f2b039442ae63a7c03 /clang/lib/CodeGen/CGStmtOpenMP.cpp
parent9762b26032c8b926fc2a77b30c93c2aacc52a46e (diff)
downloadbcm5719-llvm-a90fc6617fb5df0d07956d08cbc300dca5924680.tar.gz
bcm5719-llvm-a90fc6617fb5df0d07956d08cbc300dca5924680.zip
[OPENMP]Fix PR41966: type mismatch in runtime functions.
Target-based runtime functions use int64_t type for sizes, while the compiler uses size_t type. It leads to miscompilation in 32 bit mode. llvm-svn: 364327
Diffstat (limited to 'clang/lib/CodeGen/CGStmtOpenMP.cpp')
-rw-r--r--clang/lib/CodeGen/CGStmtOpenMP.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGStmtOpenMP.cpp b/clang/lib/CodeGen/CGStmtOpenMP.cpp
index 6a973cdb57e..a5396a362f2 100644
--- a/clang/lib/CodeGen/CGStmtOpenMP.cpp
+++ b/clang/lib/CodeGen/CGStmtOpenMP.cpp
@@ -3119,7 +3119,8 @@ void CodeGenFunction::EmitOMPTargetTaskBasedDirective(
PVD = createImplicitFirstprivateForType(
getContext(), Data, BaseAndPointersType, CD, S.getBeginLoc());
QualType SizesType = getContext().getConstantArrayType(
- getContext().getSizeType(), ArrSize, ArrayType::Normal,
+ getContext().getIntTypeForBitwidth(/*DestWidth=*/64, /*Signed=*/1),
+ ArrSize, ArrayType::Normal,
/*IndexTypeQuals=*/0);
SVD = createImplicitFirstprivateForType(getContext(), Data, SizesType, CD,
S.getBeginLoc());
OpenPOWER on IntegriCloud