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-3525.c
blob
bf0deb75ffa6ed3002f94e78c6d87ed67fba8361
1
/* bug-3523.c
2
Instructions that conditionally skip the following instruction were not considered correctly in the peephole optimizer.
3
*/
4
5
#include <testfwk.h>
6
7
char
c
;
8
9
char
f
(
void
)
10
{
11
char
a
=
c
+
1
;
12
if
(
a
<
3
)
13
return
1
;
14
return
a
;
// The ret got incorrectly optimized out for pdk.
15
}
16
17
void
18
testBug
(
void
)
19
{
20
c
=
3
;
21
ASSERT
(
f
() ==
4
);
22
}
23