struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug-3242.c
blobeec91ada727c15b3615a03759cbb9deaa51f20f8
1 /*
2 bug-3240.c. A bug in z80 code generation regarding handling of register pair hl.
3 */
5 #include <testfwk.h>
7 typedef unsigned short uint16;
9 uint16 x, y;
11 char flag;
13 static uint16 printHello() {
14 flag = 1;
15 return 1;
18 static uint16 hello(uint16 a, uint16 b) {
19 uint16 result = 0;
20 if(a + b > x - y){
21 result = printHello();
23 return result;
26 void
27 testBug(void) {
28 x = 2000;
29 y = 1000;
30 hello(600,600);
31 ASSERT (flag);