summaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/volatile-1.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-12-06 06:10:02 +0000
committerJohn McCall <rjmccall@apple.com>2010-12-06 06:10:02 +0000
commitcd940a1e13e588a43973cd7ae33b5c33a3062739 (patch)
tree0e252caddabd8025cb89eae60011e4a67fb65a97 /test/CodeGenCXX/volatile-1.cpp
parent01b2e4e3e2fbd60e62539f7e8e8b99575fa8a5b0 (diff)
downloadclang-cd940a1e13e588a43973cd7ae33b5c33a3062739.tar.gz
__block variables require us to evaluate the RHS of an assignment before
the LHS, or else the pointer might be invalid. This is kindof dumb, but go ahead and make sure we're doing that for l-value scalar assignment, which fixes a miscompile of obj-c++.dg/block-seq.mm. Leave a FIXME for how to solve this problem for agg __blocks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120992 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/volatile-1.cpp')
-rw-r--r--test/CodeGenCXX/volatile-1.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/CodeGenCXX/volatile-1.cpp b/test/CodeGenCXX/volatile-1.cpp
index ba43471abf..0569150101 100644
--- a/test/CodeGenCXX/volatile-1.cpp
+++ b/test/CodeGenCXX/volatile-1.cpp
@@ -346,9 +346,9 @@ void test() {
// CHECK-NEXT: volatile store {{.*}}, [[INT]]* @j
(j=k,i)=i;
+ // CHECK-NEXT: volatile load [[INT]]* @i
// CHECK-NEXT: volatile load [[INT]]* @k
// CHECK-NEXT: volatile store {{.*}}, [[INT]]* @j
- // CHECK-NEXT: volatile load [[INT]]* @i
// CHECK-NEXT: volatile store {{.*}}, [[INT]]* @i
// CHECK-NEXT: ret void