struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug-3251.c.in
blobccd8f71e0cb2c367f8a7f76386e2a5f8c915d122
1 /*
2 bug-3251.c An assertion failure in stm8 code generation.
3 convention: , __raisonance, __iar, __cosmic
4 */
6 #include <testfwk.h>
8 #ifdef __SDCC_stm8
9 int f(int i, int j, int (*c)(int , int) {convention})
11 return (*c)(i, j);
14 int add(int i, int j) {convention}
16 return(i + j);
18 #endif
20 void
21 testBug(void)
23 #ifdef __SDCC_stm8
24 ASSERT (f(1, 1, add) == 2);
25 #endif