]> granicus.if.org Git - clang/commit
[OPENMP] DO not crash on combined constructs in declare target
authorAlexey Bataev <a.bataev@hotmail.com>
Wed, 16 May 2018 15:08:32 +0000 (15:08 +0000)
committerAlexey Bataev <a.bataev@hotmail.com>
Wed, 16 May 2018 15:08:32 +0000 (15:08 +0000)
commit90a2c3d33a317e095f641bb73cf59fd194d99b7f
tree413e9fd98e9c10645b1f29201dc10f6589e2eae7
parent0bde186a041eadca1b0f2cc7ad05b9f07d846730
[OPENMP] DO not crash on combined constructs in declare target
functions.

If the combined construct is specified in the declare target function
and the device code is emitted, the compiler crashes because of the
incorrectly chosen captured stmt. We should choose the innermost
captured statement, not the outermost.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@332477 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGStmtOpenMP.cpp
test/OpenMP/declare_target_codegen.cpp