[PATCH] D71475: [WIP][OPENMP] Try to fix linear clause crash by emitting alloca for step
Alexey Bataev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 13 15:00:00 PST 2019
ABataev added a comment.
Here is the fix:
diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp
index e02c1c5..5ce81b0 100644
--- a/clang/lib/Sema/SemaOpenMP.cpp
+++ b/clang/lib/Sema/SemaOpenMP.cpp
@@ -3830,6 +3830,9 @@ StmtResult Sema::ActOnOpenMPRegionEnd(StmtResult S,
MarkDeclarationsReferencedInExpr(E);
}
}
+ if (auto *LC = dyn_cast<OMPLinearClause>(Clause))
+ if (Expr *E = LC->getStep())
+ MarkDeclarationsReferencedInExpr(E);
DSAStack->setForceVarCapturing(/*V=*/false);
} else if (CaptureRegions.size() > 1 ||
CaptureRegions.back() != OMPD_unknown) {
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71475/new/
https://reviews.llvm.org/D71475
More information about the cfe-commits
mailing list