repo.or.cz
/
sdcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
struct / union in initializer, RFE #901.
[sdcc.git]
/
sdcc
/
support
/
regression
/
tests
/
bug-3242.c
blob
eec91ada727c15b3615a03759cbb9deaa51f20f8
1
/*
2
bug-3240.c. A bug in z80 code generation regarding handling of register pair hl.
3
*/
4
5
#include <testfwk.h>
6
7
typedef
unsigned short
uint16
;
8
9
uint16 x
,
y
;
10
11
char
flag
;
12
13
static
uint16
printHello
() {
14
flag
=
1
;
15
return
1
;
16
}
17
18
static
uint16
hello
(
uint16 a
,
uint16 b
) {
19
uint16 result
=
0
;
20
if
(
a
+
b
>
x
-
y
){
21
result
=
printHello
();
22
}
23
return
result
;
24
}
25
26
void
27
testBug
(
void
) {
28
x
=
2000
;
29
y
=
1000
;
30
hello
(
600
,
600
);
31
ASSERT
(
flag
);
32
}
33