7 #if !defined( __SDCC_pdk14) && !defined( __SDCC_pdk15) // pdk needs function pointer to be reentrant even for a single argument
8 typedef int (*funcType
) (int);
29 } testS
= {{foo0
, foo1
}, foo2
};
34 #if !defined( __SDCC_pdk14) && !defined( __SDCC_pdk15)
35 ASSERT (testS
.fpa
[0] (5) == 7);
36 ASSERT (testS
.fpa
[1] (9) == 3);
37 ASSERT (testS
.fpb (5) == 10);
43 ASSERT (testS
.fpa
[0] (5) == -1);
44 ASSERT (testS
.fpa
[1] (9) == 18);
45 ASSERT (testS
.fpb (5) == 7);
47 testS
.fpb
= testS
.fpa
[0];
48 testS
.fpa
[0] = testS
.fpa
[1];
51 ASSERT (testS
.fpa
[0] (5) == 10);
52 ASSERT (testS
.fpa
[1] (9) == 11);
53 ASSERT (testS
.fpb (5) == -1);