Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / test / BlocksRuntime / rdar6396238.c
blob2ba0dbf4bd317c978811002623120ad67630b821
1 //
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://6396238
8 #include <stdio.h>
9 #include <stdlib.h>
11 static int count = 0;
13 void (^mkblock(void))(void)
15 count++;
16 return ^{
17 count++;
21 int main (int argc, const char * argv[]) {
22 mkblock()();
23 if (count != 2) {
24 printf("%s: failure, 2 != %d\n", argv[0], count);
25 exit(1);
26 } else {
27 printf("%s: success\n", argv[0]);
28 exit(0);
30 return 0;