[Sanitizer] Add rudimentary support for wide-character strings to scanf/printf interc...
[blocksruntime.git] / test / BlocksRuntime / copy-block-literal-rdar6439600.c
blob6fa488eee4ff82acc575e1c257ac0c359816f420
1 //
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.
7 // CONFIG open rdar://6439600
9 #import <stdio.h>
10 #import <stdlib.h>
12 #define NUMBER_OF_BLOCKS 100
13 int main (int argc, const char * argv[]) {
14 int (^x[NUMBER_OF_BLOCKS])();
15 int i;
17 for(i=0; i<NUMBER_OF_BLOCKS; i++) x[i] = ^{ return i; };
19 for(i=0; i<NUMBER_OF_BLOCKS; i++) {
20 if (x[i]() != i) {
21 printf("%s: failure, %d != %d\n", argv[0], x[i](), i);
22 exit(1);
26 printf("%s: success\n", argv[0]);
28 return 0;