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