repo.or.cz
/
smatch.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
comparison: select the caller_info
[smatch.git]
/
validation
/
generic-functions.c
blob
61bfd99e2808e7cd0f9487ab991a2d424cda548e
1
void
funf
(
float
);
2
void
fund
(
double
);
3
void
funl
(
long double
);
4
5
#define fung(X) _Generic(X, \
6
float: funf, \
7
default: fund, \
8
long double: funl) (X)
9
10
#define TEST(name, T) \
11
static void test ## name(T a) { return fung(a); }
12
13
TEST
(
f
,
float
)
14
TEST
(
d
,
double
)
15
TEST
(
l
,
long double
)
16
17
/*
18
* check-name: generic-functions
19
* check-command: test-linearize $file
20
*
21
* check-output-start
22
testf:
23
.L0:
24
<entry-point>
25
call funf, %arg1
26
ret
27
28
29
testd:
30
.L2:
31
<entry-point>
32
call fund, %arg1
33
ret
34
35
36
testl:
37
.L4:
38
<entry-point>
39
call funl, %arg1
40
ret
41
42
43
* check-output-end
44
*/