struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-pr49281.c
blobbdd3fec4666d00f28ab2b828f267bd66c793ef37
1 /*
2 pr49281.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 target/49281 */
13 extern void abort (void);
15 int
16 foo (int x)
18 return (x << 2) | 4;
21 int
22 bar (int x)
24 return (x << 2) | 3;
27 void
28 testTortureExecute (void)
30 if (foo (43) != 172 || foo (1) != 4 || foo (2) != 12)
31 ASSERT (0);
32 if (bar (43) != 175 || bar (1) != 7 || bar (2) != 11)
33 ASSERT (0);
34 return;