diff options
author | David Majnemer <david.majnemer@gmail.com> | 2015-02-14 01:48:17 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2015-02-14 01:48:17 +0000 |
commit | 212af641f2b71dbc372b3cfb283b332116c68b26 (patch) | |
tree | b79898a5b0d2e64f247809db17b4f7ed53658a9b /test/CodeGen/atomic_ops.c | |
parent | 1fc307f60cc61c65138624c49a702ac572acad45 (diff) | |
download | clang-212af641f2b71dbc372b3cfb283b332116c68b26.tar.gz |
CodeGen: _Atomic(_Complex) shouldn't crash
We could be a little kinder if we did a compare-exchange loop instead of
an atomic-load/store pair.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@229212 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/atomic_ops.c')
-rw-r--r-- | test/CodeGen/atomic_ops.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/CodeGen/atomic_ops.c b/test/CodeGen/atomic_ops.c index 5f2a1966a2..4f9bc41037 100644 --- a/test/CodeGen/atomic_ops.c +++ b/test/CodeGen/atomic_ops.c @@ -26,3 +26,11 @@ _Bool bar() { // CHECK: ret i1 %[[tobool]] return b; } + +extern _Atomic(_Complex int) x; + +void baz(int y) { +// CHECK-LABEL: @baz +// CHECK: store atomic + x += y; +} |