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
/
bug3501942.c
blob
65c9942dc54d0281b0ff944eee52d7527abb5732
1
/* bug3501942, an issue with operandsNotrelated() in peepholes for z80-related ports.
2
*/
3
4
#include <testfwk.h>
5
#include <math.h>
6
7
int
value
;
8
9
int
f
(
void
)
10
{
11
return
1
;
12
}
13
14
void
g
(
void
)
15
{
16
if
(
value
=
f
())
/* Bug was triggered here. */
17
return
;
18
}
19
20
void
testBug
(
void
)
21
{
22
value
=
0
;
23
g
();
24
ASSERT
(
value
==
1
);
25
}
26