struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug-3132.c
blobcb9fe1948dfcbb65e4760e50da193c23bd69b79d
1 /*
2 bug-3132.c
3 A bug in pdk code generation for jump on & if all bytes of the mask are 0xff or 0x00 and the highest byte is 0x00.
4 */
6 #include <testfwk.h>
8 #include <stdint.h>
10 volatile uint8_t block = 0;
12 void f(void)
15 for( uint16_t t=0; t<0x101; t++ )
17 if( 0 == (t&0xFF) ) // BUG: this compare is compiled to "if( 0 == t )"
18 block++;
22 void
23 testBug (void)
25 f();
26 ASSERT (block == 2);