aboutsummaryrefslogtreecommitdiffstats
path: root/test/FrontendC++/2009-06-30-ByrefBlock.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/FrontendC++/2009-06-30-ByrefBlock.cpp')
-rw-r--r--test/FrontendC++/2009-06-30-ByrefBlock.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/FrontendC++/2009-06-30-ByrefBlock.cpp b/test/FrontendC++/2009-06-30-ByrefBlock.cpp
new file mode 100644
index 0000000..be9c94f
--- /dev/null
+++ b/test/FrontendC++/2009-06-30-ByrefBlock.cpp
@@ -0,0 +1,11 @@
+// Insure __block_holder_tmp is allocated on the stack. Darwin only.
+// RUN: %llvmgxx %s -S -O2 -o - | egrep {__block_holder_tmp.*alloca}
+// XFAIL: *
+// XTARGET: darwin
+// <rdar://problem/5865221>
+// END.
+extern void fubar_dispatch_sync(void (^PP)(void));
+void fubar() {
+ __block void *voodoo;
+ fubar_dispatch_sync(^(void){voodoo=0;});
+}