tsan: fix deadlock detector lit test output
[blocksruntime.git] / test / BlocksRuntime / byrefaccess.c
blob4565553338ac2a214475dc3892567f70f215fcd3
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 // byrefaccess.m
9 // test that byref access to locals is accurate
10 // testObjects
12 // Created by Blaine Garst on 5/13/08.
14 // CONFIG
16 #include <stdio.h>
19 void callVoidVoid(void (^closure)(void)) {
20 closure();
23 int main(int argc, char *argv[]) {
24 __block int i = 10;
26 callVoidVoid(^{ ++i; });
28 if (i != 11) {
29 printf("*** %s didn't update i\n", argv[0]);
30 return 1;
32 printf("%s: success\n", argv[0]);
33 return 0;