2 // The LLVM Compiler Infrastructure
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
11 * Created by Blaine Garst on 9/29/08.
13 * works in all configurations
14 * CONFIG rdar://6230297
19 void (^global
)(void) = ^{ printf("hello world\n"); };
21 int aresame(void *first
, void *second
) {
22 long *f
= (long *)first
;
23 long *s
= (long *)second
;
26 int main(int argc
, char *argv
[]) {
28 void (^local
)(void) = ^ { printf("hi %d\n", i
); };
29 void (^localisglobal
)(void) = ^ { printf("hi\n"); };
31 if (aresame(local
, localisglobal
)) {
32 printf("local block could be global, but isn't\n");
35 if (!aresame(global
, localisglobal
)) {
36 printf("local block is not global, not stack, what is it??\n");
39 printf("%s: success\n", argv
[0]);