blob: 280415643a1acc3c75c6363720b32edce19f35e3 [file] [log] [blame]
Blaine Garst86d0ba42010-08-04 23:34:21 +00001//
2// The LLVM Compiler Infrastructure
3//
4// This file is distributed under the University of Illinois Open Source
5// License. See LICENSE.TXT for details.
6
7// CONFIG rdar://6396238
8
9#include <stdio.h>
10#include <stdlib.h>
11
12static int count = 0;
13
14void (^mkblock(void))(void)
15{
16 count++;
17 return ^{
18 count++;
19 };
20}
21
22int main (int argc, const char * argv[]) {
23 mkblock()();
24 if (count != 2) {
25 printf("%s: failure, 2 != %d\n", argv[0], count);
26 exit(1);
27 } else {
28 printf("%s: success\n", argv[0]);
29 exit(0);
30 }
31 return 0;
32}