diff options
| author | Alexey Bataev <a.bataev@hotmail.com> | 2016-11-07 18:15:02 +0000 |
|---|---|---|
| committer | Alexey Bataev <a.bataev@hotmail.com> | 2016-11-07 18:15:02 +0000 |
| commit | 611b0a11dfb49c8cbefabf0f582031088758b9cd (patch) | |
| tree | b64e2c2fcadb557906db77ce41c1573828b6a5ce /clang/test | |
| parent | 18082abfc2e59cbeff0273f937fc3e9f88e0c160 (diff) | |
| download | bcm5719-llvm-611b0a11dfb49c8cbefabf0f582031088758b9cd.tar.gz bcm5719-llvm-611b0a11dfb49c8cbefabf0f582031088758b9cd.zip | |
[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
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/OpenMP/atomic_write_codegen.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/test/OpenMP/atomic_write_codegen.c b/clang/test/OpenMP/atomic_write_codegen.c index 66172af07e8..050d7a51056 100644 --- a/clang/test/OpenMP/atomic_write_codegen.c +++ b/clang/test/OpenMP/atomic_write_codegen.c @@ -78,6 +78,9 @@ float2 float2x; register int rix __asm__("esp"); int main() { +// CHECK: store atomic i32 1, i32* getelementptr inbounds ({ i32, i32 }, { i32, i32 }* @civ, i32 0, i32 1) monotonic, +#pragma omp atomic write + __imag(civ) = 1; // CHECK: load i8, i8* // CHECK: store atomic i8 #pragma omp atomic write |

