[Sanitizer] Add rudimentary support for wide-character strings to scanf/printf interc...
[blocksruntime.git] / test / BlocksRuntime / recursiveassign.c
blobf0070cbe5c9385f5b91059d21323a5d8cefe350f
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 /*
8 * recursiveassign.c
9 * testObjects
11 * Created by Blaine Garst on 12/3/08.
15 // CONFIG rdar://6639533
17 // The compiler is prefetching x->forwarding before evaluting code that recomputes forwarding and so the value goes to a place that is never seen again.
19 #include <stdio.h>
20 #include <stdlib.h>
21 #include <Block.h>
24 int main(int argc, char* argv[]) {
26 __block void (^recursive_copy_block)(int) = ^(int arg) { printf("got wrong Block\n"); exit(1); };
29 recursive_copy_block = Block_copy(^(int i) {
30 if (i > 0) {
31 recursive_copy_block(i - 1);
33 else {
34 printf("done!\n");
36 });
39 recursive_copy_block(5);
41 printf("%s: Success\n", argv[0]);
42 return 0;