Insure that __block_holder_tmp is allocated on the stack when a byref
variable is present.

llvm-svn: 74610
diff --git a/llvm/test/FrontendC++/2009-06-30-ByrefBlock.cpp b/llvm/test/FrontendC++/2009-06-30-ByrefBlock.cpp
new file mode 100644
index 0000000..6f8869c5
--- /dev/null
+++ b/llvm/test/FrontendC++/2009-06-30-ByrefBlock.cpp
@@ -0,0 +1,8 @@
+// Insure __block_holder_tmp is allocated on the stack.
+// RUN: %llvmgxx %s -S -O2 -o - | egrep {__block_holder_tmp.*alloca}
+// <rdar://problem/5865221>
+extern void fubar_dispatch_sync(void (^PP)(void));
+void fubar() {
+  __block void *voodoo;
+ fubar_dispatch_sync(^(void){voodoo=0;});
+}