[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)
commit611b0a11dfb49c8cbefabf0f582031088758b9cd
treeb64e2c2fcadb557906db77ce41c1573828b6a5ce
parent18082abfc2e59cbeff0273f937fc3e9f88e0c160
[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.

llvm-svn: 286129
clang/lib/CodeGen/CGExpr.cpp
clang/test/OpenMP/atomic_write_codegen.c