struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug-441448.c
blob2390da4b03390432516855b7e80ce07be99e866e
1 /* bug-441448.c
2 PENDING
3 */
4 #include <testfwk.h>
6 #define DATA
8 typedef struct
10 #ifdef __SDCC_pdk14 // Lack of memory
11 unsigned char buffer[0x08];
12 #else
13 unsigned char buffer[0x18];
14 #endif
15 unsigned char OutPtr, InPtr;
16 unsigned char Count;
17 } Fifo;
19 DATA Fifo TxFifo={"ABCD", 0, 0, 0}, RxFifo={"FGHI", 0, 0, 0};
20 DATA unsigned char dummy1, dummy2;
22 void
23 testPrePostIncrement(void)
25 dummy2 = TxFifo.buffer[++TxFifo.OutPtr];
26 dummy1 = RxFifo.buffer[RxFifo.OutPtr++];
28 ASSERT(dummy2 == 'B');
29 ASSERT(dummy1 == 'F');