tsan: fix deadlock detector lit test output
[blocksruntime.git] / test / BlocksRuntime / constassign.c
blob537cb2df059793d2c08def039c0e825cc9ab41aa
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 // constassign.c
9 // bocktest
11 // Created by Blaine Garst on 3/21/08.
13 // shouldn't be able to assign to a const pointer
14 // CONFIG error: assignment of read-only
16 #import <stdio.h>
18 void foo(void) { printf("I'm in foo\n"); }
19 void bar(void) { printf("I'm in bar\n"); }
21 int main(int argc, char *argv[]) {
22 void (*const fptr)(void) = foo;
23 void (^const blockA)(void) = ^ { printf("hello\n"); };
24 blockA = ^ { printf("world\n"); } ;
25 fptr = bar;
26 printf("%s: success\n", argv[0]);
27 return 0;