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
/
bug1678803.c
blob
c866b024e43db0a7621f0680c2921f808fcad8a3
1
/*
2
bug 1678803
3
This should not generate error 12 "called object is not a function".
4
*/
5
6
#include <testfwk.h>
7
8
typedef
void
(*
func
)(
void
);
9
10
void
foo
(
void
)
11
{
12
}
13
14
#ifdef __SDCC_mcs51
15
func
GetFunc
(
void
)
__naked
16
{
17
__asm
18
19
;
some assembler code
20
mov dptr
,
#_foo
21
#ifdef __SDCC_MODEL_HUGE
22
mov B
,
#_foo>>16
23
ljmp __sdcc_banked_ret
24
#else
25
ret
26
#endif
27
__endasm
;
28
}
29
#endif
30
31
void
testCaller
(
void
)
32
{
33
#ifdef __SDCC_mcs51
34
GetFunc
()();
35
#endif
36
37
ASSERT
(
1
);
38
}