struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug-2664.c
blob7f2987a1e9af8c7e192f1ea661aea259010b41d5
1 /* bug-2664.c
2 A frontend issue in the handling of functions returning function pointers (without using a typedef)
3 */
5 #include <testfwk.h>
7 int i;
9 void (*s(int signo, void (*func)(int signo) __reentrant))(int signo)
11 func(signo);
12 return(func);
15 void (*f(int j))(void)
17 i = j;
18 return 0;
21 void g(int j) __reentrant
23 i = j;
26 void
27 testBug(void)
29 f(1);
30 ASSERT (i == 1);
31 s(2, &g);
32 ASSERT (i == 2);