PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / 20141107-1.c
blobe4590b39e495aa3df31886c54a217078cd0c5ef8
1 #define bool _Bool
3 bool f(int a, bool c) __attribute__((noinline));
4 bool f(int a, bool c)
6 if (!a)
7 c = !c;
8 return c;
11 void checkf(int a, bool b)
13 bool c = f(a, b);
14 char d;
15 __builtin_memcpy (&d, &c, 1);
16 if ( d != (a==0)^b)
17 __builtin_abort();
20 int main(void)
22 checkf(0, 0);
23 checkf(0, 1);
24 checkf(1, 1);
25 checkf(1, 0);
26 return 0;