struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug3379723.c
blob6aa1a59256a746046ae223bd063abacbb8abb94c
1 /*
2 bug3379723.c
3 */
5 #include <testfwk.h>
7 #if !defined(PORT_HOST) && !defined(__SDCC_hc08) && !defined(__SDCC_s08) && !defined(__SDCC_mos6502) && !defined(__SDCC_mos65c02) && !defined(__SDCC_sm83) && !defined(__SDCC_stm8) && !defined(__SDCC_tlcs90) && !defined(__SDCC_pdk14) && !defined(__SDCC_pdk15) && !defined(__SDCC_f8)
9 #define UCHAR unsigned char
11 __sfr __at 0xf0 rGPIO_B_Output_Enable;
12 __sfr __at 0xf1 rGPIO_B_Input_Enable;
13 __sfr __at 0xf2 rGPIO_B;
15 UCHAR _Check_B_By_B(UCHAR iAndMask) // pull low
17 UCHAR iVal, iOrMask;
19 iOrMask = ~iAndMask;
20 rGPIO_B_Input_Enable &= iAndMask;
21 rGPIO_B_Output_Enable |= iOrMask;
22 rGPIO_B |= iOrMask;
23 iVal = rGPIO_B;
24 iVal &= iAndMask;
25 rGPIO_B &= iAndMask;
26 rGPIO_B_Output_Enable &= iAndMask;
27 rGPIO_B_Input_Enable |= iOrMask;
29 return iVal;
31 #endif
33 void
34 testBug (void)
36 ASSERT (1);