1 /**
2 *
3 * In this test case, we want the first parameter of the function
4 * wrapped_call to be represented in the output abixml by a pointer to
5 * the same function type as the one pointed to by the types
6 * fn_ptr_type_a_t and fn_ptr_type_b_t.
7 *
8 * This means that we want the function type pointed by these three
9 * function pointer to be the same, as a result of the
10 * canonicalization of the DIEs that represent these three function
11 * types.
12 *
13 */
14 #include "PR26261-obja.h"
15 #include "PR26261-objb.h"
16
17 void
wrapped_call(void (* fun)(int,int),int a,int b)18 wrapped_call(void (*fun)(int, int),
19 int a,
20 int b)
21 {
22 if (fun)
23 fun(a, b);
24 }
25
26 int
main(int argc,char ** argv)27 main(int argc, char ** argv)
28 {
29 struct SA sa = {0, 0, 0};
30 struct SB sb = {0, 0};
31
32 sa.m1 = 0;
33 sb.m1 = 0;
34
35 fun_obja(&sa);
36 fun_objb(&sb);
37 wrapped_call(sa.m2, sa.m1, sb.m1);
38
39 return 0;
40 }
41