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
Pick three bugfixes from next branch to trunk for inclusion in 4.5.0 RC2, as discusse...
[sdcc.git]
/
sdcc
/
support
/
regression
/
tests
/
bug-2480.c
blob
d501446aa7a5a616b0ad2795519ce2f92178da2c
1
/*
2
bug-2480.c
3
*/
4
5
#include <testfwk.h>
6
7
typedef
unsigned char uint8_t
;
8
9
uint8_t
v
[
3
] = {
0xaa
,
0xaa
,
0xaa
};
10
11
void
testBug
(
void
)
12
{
13
uint8_t
aa
;
14
uint8_t
bb
;
15
16
aa
=
v
[
0
];
17
bb
=
aa
&
0x80
;
18
aa
&=
0x7F
;
19
v
[
1
] =
bb
;
20
v
[
2
] =
aa
;
21
22
ASSERT
(
v
[
0
] ==
0xaa
);
23
ASSERT
(
v
[
1
] ==
0x80
);
24
ASSERT
(
v
[
2
] ==
0x2a
);
25
}