comparison: select the caller_info
[smatch.git] / validation / generic-functions.c
blob61bfd99e2808e7cd0f9487ab991a2d424cda548e
1 void funf(float);
2 void fund(double);
3 void funl(long double);
5 #define fung(X) _Generic(X, \
6 float: funf, \
7 default: fund, \
8 long double: funl) (X)
10 #define TEST(name, T) \
11 static void test ## name(T a) { return fung(a); }
13 TEST(f, float)
14 TEST(d, double)
15 TEST(l, long double)
18 * check-name: generic-functions
19 * check-command: test-linearize $file
21 * check-output-start
22 testf:
23 .L0:
24 <entry-point>
25 call funf, %arg1
26 ret
29 testd:
30 .L2:
31 <entry-point>
32 call fund, %arg1
33 ret
36 testl:
37 .L4:
38 <entry-point>
39 call funl, %arg1
40 ret
43 * check-output-end