struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-pr64957.c
blobd1b1c1cc572878a0e5460bba0d687d4f3772c144
1 /*
2 pr60822.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 rtl-optimization/64957 */
13 int
14 foo (int b)
16 return (((b ^ 5) | 1) ^ 5) | 1;
19 int
20 bar (int b)
22 return (((b ^ ~5) & ~1) ^ ~5) & ~1;
25 void
26 testTortureExecute (void)
28 int i;
29 for (i = 0; i < 16; i++)
30 if (foo (i) != (i | 1) || bar (i) != (i & ~1))
31 ASSERT (0);
32 return;