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
Pick three bugfixes from next branch to trunk for inclusion in 4.5.0 RC2, as discusse...
[sdcc.git]
/
sdcc
/
support
/
regression
/
tests
/
bug-3056.c
blob
9ae13ec1866f3656a9772a5f075110932f294be8
1
/*
2
bug-3056.c - function name not promoted to function pointer
3
inside conditional operator
4
*/
5
6
#include <testfwk.h>
7
8
unsigned char
x
;
9
10
void
f1
(
void
)
11
{
12
x
=
1
;
13
}
14
15
void
f2
(
void
)
16
{
17
x
=
2
;
18
}
19
20
void
bug
(
int
i
)
21
{
22
(
i
?
f1
:
f2
)();
23
}
24
25
void
testBug
(
void
)
26
{
27
ASSERT
(
x
==
0
);
28
bug
(
1
);
29
ASSERT
(
x
==
1
);
30
bug
(
0
);
31
ASSERT
(
x
==
2
);
32
}
33