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
/
bug1509084.c
blob
299e8ad866edca6684e3aeddb0eff986d3cb5c0d
1
/*
2
bug 1509084
3
*/
4
5
#include <testfwk.h>
6
7
#ifdef __SDCC
8
#pragma std_sdcc99
9
#endif
10
11
#include <stdbool.h>
12
13
#if !defined(__bool_true_false_are_defined)
14
#define bool unsigned char
15
#endif
16
17
unsigned char
aa
,
bb
,
cc
,
dd
,
ee
;
18
19
void
leds_name_repaint
(
void
)
20
{
21
unsigned char
an
;
22
unsigned char
dg
=
aa
;
23
bool
s
=
0
;
24
25
for
(
an
=
0
;
an
<
5
;
an
++ )
26
{
27
s
= ( (
long
)
aa
>>
1
) >
0
;
28
if
(
s
)
29
{
30
aa
+=
dg
+
1
;
31
bb
+=
dg
+
2
;
32
cc
+=
dg
+
3
;
33
dd
+=
dg
+
4
;
34
ee
+=
dg
+
5
;
35
}
36
}
37
}
38
39
void
40
testBug
(
void
)
41
{
42
aa
=
2
;
43
leds_name_repaint
();
44
ASSERT
(
aa
==
17
);
45
}
46