Imported Upstream version 2.9.0
[debian/cc1111] / support / regression / tests / bug2094505.c
1 /*
2     bug 2094505
3 */
4
5 #include <testfwk.h>
6
7 void
8 testBug(void)
9 {
10 #if !defined(SDCC) || !defined(SDCC_mcs51) || defined(SDCC_MODEL_LARGE)
11     // varA has to be declared for the bug to manifest itself
12     volatile char varA[256] = {0};
13     volatile unsigned int varB = 0x1;
14     volatile unsigned short varC = 0x2;
15
16     // The Less Than comparison ASM for this while loop is generated incorrectly.
17     ASSERT (varB < varC);
18 #endif
19 }