2 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
3 // See https://llvm.org/LICENSE.txt for license information.
4 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
10 // Created by Blaine Garst on 3/21/08.
12 // shouldn't be able to assign to a const pointer
13 // CONFIG error: assignment of read-only
17 void foo(void) { printf("I'm in foo\n"); }
18 void bar(void) { printf("I'm in bar\n"); }
20 int main(int argc
, char *argv
[]) {
21 void (*const fptr
)(void) = foo
;
22 void (^const blockA
)(void) = ^ { printf("hello\n"); };
23 blockA
= ^ { printf("world\n"); } ;
25 printf("%s: success\n", argv
[0]);