struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-pr37931.c
blobc1ea06cd8be57235ca41d1055f3b8bd0de09a531
1 /*
2 pr37931.c from the execute part of the gcc torture tests.
3 */
5 #include <testfwk.h>
7 #ifdef __SDCC
8 #pragma std_c99
9 #endif
11 /* PR middle-end/37931 */
14 int
15 foo (int a, unsigned int b)
17 return (a | 1) & (b | 1);
20 void
21 testTortureExecute (void)
23 if (foo (6, 0xc6) != 7)
24 ASSERT (0);
25 if (foo (0x80, 0xc1) != 0x81)
26 ASSERT (0);
27 if (foo (4, 4) != 5)
28 ASSERT (0);
29 if (foo (5, 4) != 5)
30 ASSERT (0);
31 return;