diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2018-12-19 18:16:37 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2018-12-19 18:16:37 +0000 |
commit | ce90181751246f240302a930ca853cb5b1fb95c5 (patch) | |
tree | d7087c39f14d49e6d921bf65edd7053db94fd111 /clang/lib/Sema/SemaOpenMP.cpp | |
parent | 2bb4a4901bcbe3bb1d7c4b88064fd8c6bcc405e4 (diff) | |
download | bcm5719-llvm-ce90181751246f240302a930ca853cb5b1fb95c5.tar.gz bcm5719-llvm-ce90181751246f240302a930ca853cb5b1fb95c5.zip |
[OPENMP]Mark the loop as started when initialized.
Need to mark the loop as started when the initialization statement is
found. It is required to prevent possible incorrect loop iteraton
variable detection during template instantiation and fix the compiler
crash during the codegen.
llvm-svn: 349657
Diffstat (limited to 'clang/lib/Sema/SemaOpenMP.cpp')
-rw-r--r-- | clang/lib/Sema/SemaOpenMP.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp index c207ba9bd32..4fe8d3dd593 100644 --- a/clang/lib/Sema/SemaOpenMP.cpp +++ b/clang/lib/Sema/SemaOpenMP.cpp @@ -4649,6 +4649,7 @@ void Sema::ActOnOpenMPLoopInitialization(SourceLocation ForLoc, Stmt *Init) { unsigned AssociatedLoops = DSAStack->getAssociatedLoops(); if (AssociatedLoops > 0 && isOpenMPLoopDirective(DSAStack->getCurrentDirective())) { + DSAStack->loopStart(); OpenMPIterationSpaceChecker ISC(*this, ForLoc); if (!ISC.checkAndSetInit(Init, /*EmitDiags=*/false)) { if (ValueDecl *D = ISC.getLoopDecl()) { |