Instantiation of byref variable in
block literal expression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108019 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGenCXX/instantiate-blocks.cpp b/test/CodeGenCXX/instantiate-blocks.cpp
index 8c1c8dd..7246f69 100644
--- a/test/CodeGenCXX/instantiate-blocks.cpp
+++ b/test/CodeGenCXX/instantiate-blocks.cpp
@@ -18,7 +18,11 @@
 template <typename T, typename T1> void foo(T t, T1 r)
 {
     T block_arg;
-    T1 (^block)(char, T, T1, double) =  ^ T1 (char ch, T arg, T1 arg2, double d1) { return block_arg+arg; };
+    __block T1 byref_block_arg;
+
+    T1 (^block)(char, T, T1, double) =  
+	^ T1 (char ch, T arg, T1 arg2, double d1) { byref_block_arg = arg2;
+           					    return byref_block_arg + arg; };
 
     void (^block2)() = ^{};
 }