Test case for r123199.

llvm-svn: 123200
GitOrigin-RevId: 00c84fd1258cf78342c1b02f2e3537789f8defb7
diff --git a/block_var.m b/block_var.m
new file mode 100644
index 0000000..59b6a14
--- /dev/null
+++ b/block_var.m
@@ -0,0 +1,30 @@
+// RUN: %clang -O0 -g %s -c -o %t.o
+// RUN: %clang %t.o -o %t.out -framework Foundation
+// RUN: %test_debuginfo %s %t.out 
+
+// DEBUGGER: break 22
+// DEBUGGER: r
+// DEBUGGER: p result
+// CHECK: $1 = 42
+
+void doBlock(void (^block)(void))
+{
+    block();
+}
+
+int I(int n)
+{
+    __block int result;
+    int i = 2;
+    doBlock(^{
+        result = n;
+    });
+    return result + i; /* Check value of 'result' */
+}
+
+
+int main (int argc, const char * argv[]) {
+  return I(42);
+}
+
+