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 9/24/08.
12 // CONFIG rdar://6244520
18 #include <Block_private.h>
21 void check(void (^b
)(void)) {
23 struct Block_layout layout
;
24 struct Block_byref
*innerp
;
25 } *custom
= (struct _custom
*)(void *)(b
);
26 //printf("block is at %p, size is %lx, inner is %p\n", (void *)b, Block_size(b), innerp);
27 if (custom
->innerp
->isa
!= (void *)NULL
) {
28 printf("not a NULL __block isa\n");
34 int main(int argc
, char *argv
[]) {
38 check(^{ printf("%d\n", ++i
); });
39 printf("%s: success\n", argv
[0]);