]> granicus.if.org Git - clang/commit
[OPENMP] Fixed codegen for __real/__imag expressions in atomic
authorAlexey Bataev <a.bataev@hotmail.com>
Mon, 7 Nov 2016 18:15:02 +0000 (18:15 +0000)
committerAlexey Bataev <a.bataev@hotmail.com>
Mon, 7 Nov 2016 18:15:02 +0000 (18:15 +0000)
commit659e828fcc26321f1c98c29f1e7b99b29ec0a32e
tree48941124158844031a3d0c2395802fe3085ab8c9
parentf874c07d7169bc68a9dd312138598c3ccfc69c1d
[OPENMP] Fixed codegen for __real/__imag expressions in atomic
constructs.

For __real/__imag unary expressions clang emits lvalue with the
associated type from the original complex expression, but not the
underlying builtin integer or float type. This causes crash in codegen
for atomic constructs, if __real/__imag expression are used in atomic
  constructs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@286129 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGExpr.cpp
test/OpenMP/atomic_write_codegen.c