struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug-3244.c
blob5a5be841b84b489f225c47fa244ca68a50079b66
1 /*
2 bug-3240.c. A bug in z80 code generation on comparisons with 0x00 lower bytes.
3 */
5 #include <testfwk.h>
7 #include <stdint.h>
9 #ifndef PORT_HOST
10 #pragma disable_warning 85
11 #endif
13 uint16_t p = 0x202;
15 int aprintf(const char *c, ...)
17 ASSERT(0);
20 int bprintf(const char *c, ...)
22 ASSERT(1);
25 void f(void)
27 if (p < 0x0200)
28 aprintf("1. First time it does not evaluate to TRUE\r\n");
29 else
30 bprintf("2. First time it does evaluate to FALSE\r\n");
32 if (p < 0x0200)
33 aprintf("3. But now it incorrectly evaluates to TRUE\r\n");
34 else
35 bprintf("4. It should have been FALSE\r\n");
38 void
39 testBug (void)
41 f();