Pick three bugfixes from next branch to trunk for inclusion in 4.5.0 RC2, as discusse...
[sdcc.git] / sdcc / support / regression / tests / bug-3678.c
blobd33461ddd68ca3a56535bafc60e9c1bfbeeef126
1 /* bug-3661.c
2 A crash in code generation for sm83/z80 bitwise operations when both operands are in I/O space.
3 */
5 #include <testfwk.h>
7 #if defined(__SDCC_z80) || defined(__SDCC_pdk14) || defined(__SDCC_pdk15)
8 __sfr __at(0x10) changeBase;
9 __sfr __at(0x11) LCDC_REG;
10 #elif defined(__SDCC_sm83)
11 __sfr __at(0xff10) changeBase;
12 __sfr __at(0xff11) LCDC_REG;
13 #else
14 unsigned char changeBase;
15 unsigned char LCDC_REG;
16 #endif
18 void f(void)
20 LCDC_REG ^= changeBase;
23 void g(void)
25 LCDC_REG |= changeBase;
28 void h(void)
30 LCDC_REG &= changeBase;
33 void
34 testBug (void)