1 #define bool _Bool 2 3 bool f(int a, bool c) __attribute__((noinline)); f(int a,bool c)4bool f(int a, bool c) 5 { 6 if (!a) 7 c = !c; 8 return c; 9 } 10 checkf(int a,bool b)11void checkf(int a, bool b) 12 { 13 bool c = f(a, b); 14 char d; 15 __builtin_memcpy (&d, &c, 1); 16 if ( d != (a==0)^b) 17 __builtin_abort(); 18 } 19 main(void)20int main(void) 21 { 22 checkf(0, 0); 23 checkf(0, 1); 24 checkf(1, 1); 25 checkf(1, 0); 26 return 0; 27 } 28