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-2664.c
blob
7f2987a1e9af8c7e192f1ea661aea259010b41d5
1
/* bug-2664.c
2
A frontend issue in the handling of functions returning function pointers (without using a typedef)
3
*/
4
5
#include <testfwk.h>
6
7
int
i
;
8
9
void
(*
s
(
int
signo
,
void
(*
func
)(
int
signo
)
__reentrant
))(
int
signo
)
10
{
11
func
(
signo
);
12
return
(
func
);
13
}
14
15
void
(*
f
(
int
j
))(
void
)
16
{
17
i
=
j
;
18
return
0
;
19
}
20
21
void
g
(
int
j
)
__reentrant
22
{
23
i
=
j
;
24
}
25
26
void
27
testBug
(
void
)
28
{
29
f
(
1
);
30
ASSERT
(
i
==
1
);
31
s
(
2
, &
g
);
32
ASSERT
(
i
==
2
);
33
}
34