struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug3290691.c
blobf2366169e1d4ffe727c672d5f4e5797aca691e6a
1 /*
2 * bug3290691.c
3 */
5 #include <testfwk.h>
7 #ifdef __SDCC
8 #pragma std_sdcc99
9 #endif
11 #include <stdbool.h>
13 bool foo_b(bool b)
15 return !b;
18 unsigned char bar_c(unsigned char c)
20 return foo_b(c);
23 unsigned char foo_c(unsigned char c)
25 return !c;
28 bool bar_b(bool c)
30 return foo_c(c);
33 void
34 testBug(void)
36 #ifndef __SDCC_pic16
37 ASSERT( bar_c(1) == 0 );
38 ASSERT( bar_c(0) == 1 );
39 ASSERT( bar_b(1) == 0 );
40 ASSERT( bar_b(0) == 1 );
41 #endif