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-2642.c
blob
0b7e46ab926d9f83968584bc5f6a1c0348660337
1
/*
2
bug-2342.c
3
*/
4
5
#include <testfwk.h>
6
7
#define VIO (*((volatile unsigned char *) 0x400))
8
9
void
testBug
(
void
)
10
{
11
#if defined(__SDCC_stm8)
// only enabled for stm8, since 0x400 maybe a dangerous place on other ports
12
VIO
=
0xff
;
13
VIO
&=
0x7f
;
14
VIO
&=
0xf7
;
15
ASSERT
(
VIO
==
0x77
);
16
VIO
|=
0x80
;
17
VIO
|=
0x08
;
18
ASSERT
(
VIO
==
0xff
);
19
VIO
^=
0x80
;
20
VIO
^=
0x08
;
21
ASSERT
(
VIO
==
0x77
);
22
#endif
23
}