blob: eec91ada727c15b3615a03759cbb9deaa51f20f8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
/*
bug-3240.c. A bug in z80 code generation regarding handling of register pair hl.
*/
#include <testfwk.h>
typedef unsigned short uint16;
uint16 x, y;
char flag;
static uint16 printHello() {
flag = 1;
return 1;
}
static uint16 hello(uint16 a, uint16 b) {
uint16 result = 0;
if(a + b > x - y){
result = printHello();
}
return result;
}
void
testBug(void) {
x = 2000;
y = 1000;
hello(600,600);
ASSERT (flag);
}
|