Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / test / BlocksRuntime / returnfunctionptr.c
blobc4e764e62141e4c9397191dfc11f4b24046efbd0
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
7 // CONFIG rdar://6339747 but wasn't
9 #include <stdio.h>
11 int (*funcptr)(long);
13 int (*(^b)(char))(long);
15 int main(int argc, char *argv[]) {
16 // implicit is fine
17 b = ^(char x) { return funcptr; };
18 // explicit never parses
19 b = ^int (*(char x))(long) { return funcptr; };
20 printf("%s: Success\n", argv[0]);
21 return 0;