summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-10-28 21:37:57 +0000
committerJohn McCall <rjmccall@apple.com>2010-10-28 21:37:57 +0000
commit565141612f925f7b103742d121f4470fd7df5842 (patch)
treec616056c0ebf1fc98ac2286f63a8606902f5d53b /clang/test/CodeGen
parentf20f79808e96e12a5023206588369b3ab820afb7 (diff)
downloadbcm5719-llvm-565141612f925f7b103742d121f4470fd7df5842.tar.gz
bcm5719-llvm-565141612f925f7b103742d121f4470fd7df5842.zip
When emitting l-values for bool non-__block decl references, make a pointer
using the memory type; fixes an assert. Fixes rdar://problem/8605032 llvm-svn: 117610
Diffstat (limited to 'clang/test/CodeGen')
-rw-r--r--clang/test/CodeGen/blocks.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/CodeGen/blocks.c b/clang/test/CodeGen/blocks.c
index 6888356a5a1..b7b6a2d505e 100644
--- a/clang/test/CodeGen/blocks.c
+++ b/clang/test/CodeGen/blocks.c
@@ -33,3 +33,10 @@ typedef double ftype(double);
ftype ^test2 = ^ftype {
return 0;
};
+
+// rdar://problem/8605032
+void f3_helper(void (^)(void));
+void f3() {
+ _Bool b = 0;
+ f3_helper(^{ if (b) {} });
+}
OpenPOWER on IntegriCloud