1 /*
2  * $FreeBSD$
3  */
4 
5 #include <sys/types.h>
6 #include <sys/stdint.h>
7 
8 struct s1 {
9 	int		f1_int;
10 	char		*f2_str;
11 	short		f3_short;
12 	uint64_t	f4_uint64;
13 	intmax_t	f5_intmax;
14 	void*		f6_ptr;
15 };
16 
17 struct s2 {
18 	char		f1_buf[20];
19 	struct s1	*f2_s1;
20 };
21 
22 struct s3 {
23 	struct s1	f1_s1;
24 	uint32_t	f2_int32;
25 };
26 
27 enum f3_t {
28 	f3_val0, f3_val1
29 };
30 
31 struct s4 {
32 	struct s1	f1_s1;
33 	uint32_t	f2_int32;
34 	enum f3_t	f3_enum;
35 };
36 
37 typedef int i32;
38 
39 int	func1(int a, int b);
40 int	func2(int64_t a, uint64_t b);
41 void	func3(struct s1 *s);
42 void	func4(struct s1 s);
43 int32_t	func5(i32 a, void *b, struct s2 *s);
44 int	func6__compat(char a, struct s3 *s);
45 int	func6(char a, struct s4 *s);
46 
47 int
48 func1(int a, int b)
49 {
50 	return (a - b);
51 }
52 
53 int
54 func2(int64_t a, uint64_t b)
55 {
56 	return (a - b);
57 }
58 
59 void
60 func3(struct s1 *s)
61 {
62 }
63 
64 void
65 func4(struct s1 s)
66 {
67 }
68 
69 int
70 func5(int a, void *b, struct s2 *s)
71 {
72 	return (0);
73 }
74 
75 int
76 func6(char a, struct s4 *s)
77 {
78 	return (0);
79 }
80 
81 int
82 func6__compat(char a, struct s3 *s)
83 {
84 	return (0);
85 }
86 
87 __sym_compat(func6, func6__compat, TEST_1.0);
88