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
/
bug1712928.c
blob
08cf3ccd97024ebc888ab3e367a82ff498908a00
1
/*
2
bug1712928.c
3
*/
4
5
#include <testfwk.h>
6
7
#if defined (__SDCC_mcs51)
8
unsigned char
NakedFunc
(
void
)
__naked
9
{
10
__asm
11
mov dpl
,
#0x01
12
#if defined (__SDCC_MODEL_HUGE)
13
ljmp __sdcc_banked_ret
14
#else
15
ret
16
#endif
17
__endasm
;
18
}
19
#endif
20
21
void
22
testBug
(
void
)
23
{
24
#if defined (__SDCC_mcs51)
25
unsigned char
hsum
,
sum
;
26
27
hsum
=
NakedFunc
();
28
sum
=
NakedFunc
();
29
sum
+=
hsum
;
30
31
ASSERT
(
sum
==
2
);
32
#endif
33
}