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-2716.c
blob
eef1bcf013b0c811915c02e0e7284745d1c48989
1
/* bug-2716.c
2
*/
3
4
#include <testfwk.h>
5
6
struct
s
7
{
8
unsigned int
i
;
9
};
10
11
struct
s
*
p
;
12
13
int
i
,
j
;
14
15
int
g
(
void
)
16
{
17
ASSERT
(
0
);
18
19
return
(
0
);
20
}
21
22
int
f
(
void
)
23
{
24
int
a
=
i
;
25
int
b
=
j
;
26
27
if
(
p
->
i
&
4
)
/* This bit test used the wrong byte of p->i*/
28
g
();
29
30
return
(
a
+
b
);
31
}
32
33
void
testBug
(
void
)
34
{
35
struct
s s
;
36
s
.
i
=
0xff00
;
37
p
= &
s
;
38
f
();
39
}
40