[libc] Switch to using the generic `<gpuintrin.h>` implementations (#121810)
[llvm-project.git] / compiler-rt / test / BlocksRuntime / cast.c
blob09175a757eb4771d1f22b85f077fb5bba399ea57
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 /*
7 * cast.c
8 * testObjects
10 * Created by Blaine Garst on 2/17/09.
14 // PURPOSE should allow casting of a Block reference to an arbitrary pointer and back
15 // CONFIG open
17 #include <stdio.h>
21 int main(int argc, char *argv[]) {
23 void (^aBlock)(void);
24 int *ip;
25 char *cp;
26 double *dp;
28 ip = (int *)aBlock;
29 cp = (char *)aBlock;
30 dp = (double *)aBlock;
31 aBlock = (void (^)(void))ip;
32 aBlock = (void (^)(void))cp;
33 aBlock = (void (^)(void))dp;
34 printf("%s: success", argv[0]);
35 return 0;