1*c85f09ccSJohn Levon extern int fun(void);
2*c85f09ccSJohn Levon typedef unsigned int	u32;
3*c85f09ccSJohn Levon typedef          int	s32;
4*c85f09ccSJohn Levon typedef void *vdp;
5*c85f09ccSJohn Levon typedef int  *sip;
6*c85f09ccSJohn Levon typedef double dbl;
7*c85f09ccSJohn Levon typedef unsigned short __attribute__((bitwise)) le16;
8*c85f09ccSJohn Levon 
fs32_i(s32 a)9*c85f09ccSJohn Levon static _Bool fs32_i(s32 a) { return a; }
fs32_e(s32 a)10*c85f09ccSJohn Levon static _Bool fs32_e(s32 a) { return (_Bool)a; }
fu32_i(u32 a)11*c85f09ccSJohn Levon static _Bool fu32_i(u32 a) { return a; }
fu32_e(u32 a)12*c85f09ccSJohn Levon static _Bool fu32_e(u32 a) { return (_Bool)a; }
fvdp_i(vdp a)13*c85f09ccSJohn Levon static _Bool fvdp_i(vdp a) { return a; }
fvdp_e(vdp a)14*c85f09ccSJohn Levon static _Bool fvdp_e(vdp a) { return (_Bool)a; }
fsip_i(sip a)15*c85f09ccSJohn Levon static _Bool fsip_i(sip a) { return a; }
fsip_e(sip a)16*c85f09ccSJohn Levon static _Bool fsip_e(sip a) { return (_Bool)a; }
ffun_i(void)17*c85f09ccSJohn Levon static _Bool ffun_i(void)  { return fun; }
ffun_e(void)18*c85f09ccSJohn Levon static _Bool ffun_e(void)  { return (_Bool)fun; }
fres_i(le16 a)19*c85f09ccSJohn Levon static _Bool fres_i(le16 a) { return a; }
fres_e(le16 a)20*c85f09ccSJohn Levon static _Bool fres_e(le16 a) { return (_Bool)a; }
fdbl_i(dbl a)21*c85f09ccSJohn Levon static _Bool fdbl_i(dbl a) { return a; }
fdbl_e(dbl a)22*c85f09ccSJohn Levon static _Bool fdbl_e(dbl a) { return (_Bool)a; }
23*c85f09ccSJohn Levon 
24*c85f09ccSJohn Levon /*
25*c85f09ccSJohn Levon  * check-name: bool-cast
26*c85f09ccSJohn Levon  * check-command: test-linearize -m64 -fdump-ir=linearize $file
27*c85f09ccSJohn Levon  * check-assert: sizeof(void*) == 8 && sizeof(long) == 8 && sizeof(double) == 8
28*c85f09ccSJohn Levon  *
29*c85f09ccSJohn Levon  * check-output-ignore
30*c85f09ccSJohn Levon  * check-output-excludes: cast\\.
31*c85f09ccSJohn Levon  * check-output-excludes: fcvt[us]\\.
32*c85f09ccSJohn Levon  * check-output-excludes: ptrtu\\.
33*c85f09ccSJohn Levon  * check-output-excludes: [sz]ext\\.
34*c85f09ccSJohn Levon  * check-output-excludes: trunc\\.
35*c85f09ccSJohn Levon  * check-output-pattern(12): setne\\.
36*c85f09ccSJohn Levon  * check-output-pattern(2): fcmpune\\.
37*c85f09ccSJohn Levon  */
38