struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-920721-3.c
blobbe009239b634493f80601e19911d2a00c8e3fd15
1 /*
2 920721-3.c from the execute part of the gcc torture suite.
3 */
5 #include <testfwk.h>
7 #ifdef __SDCC
8 #pragma std_c99
9 #endif
11 static inline int fu (unsigned short data)
13 return data;
16 void ru(int i)
18 if(fu(i++)!=5)ASSERT(0);
19 if(fu(++i)!=7)ASSERT(0);
22 static inline int fs (signed short data)
24 return data;
27 void rs(int i)
29 if(fs(i++)!=5)ASSERT(0);
30 if(fs(++i)!=7)ASSERT(0);
33 void
34 testTortureExecute (void)
36 ru(5);
37 rs(5);
38 return;