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
6 // CONFIG rdar://6405500
10 #import <dispatch/dispatch.h>
11 #import <objc/objc-auto.h>
13 int main (int argc
, const char * argv
[]) {
14 __block
void (^blockFu
)(size_t t
);
15 blockFu
= ^(size_t t
){
17 printf("%s: success\n", argv
[0]);
20 dispatch_async(dispatch_get_main_queue(), ^{ blockFu(20); });
23 dispatch_apply(10, dispatch_get_concurrent_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT
), blockFu
);
26 printf("shouldn't get here\n");