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-3251.c.in
blob
ccd8f71e0cb2c367f8a7f76386e2a5f8c915d122
1
/*
2
bug-3251.c An assertion failure in stm8 code generation.
3
convention: , __raisonance, __iar, __cosmic
4
*/
5
6
#include <testfwk.h>
7
8
#ifdef __SDCC_stm8
9
int
f
(
int
i
,
int
j
,
int
(*
c
)(
int
,
int
) {
convention
})
10
{
11
return
(*
c
)(
i
,
j
);
12
}
13
14
int
add
(
int
i
,
int
j
) {
convention
}
15
{
16
return
(
i
+
j
);
17
}
18
#endif
19
20
void
21
testBug
(
void
)
22
{
23
#ifdef __SDCC_stm8
24
ASSERT
(
f
(
1
,
1
,
add
) ==
2
);
25
#endif
26
}
27