1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-tailc-details" } */
5 void f_direct (struct s
);
6 void f_indirect (struct s
*);
18 g2 (struct s
*param_ptr
)
20 f_direct (*param_ptr
);
25 g3 (struct s
*param_ptr
)
27 f_indirect (param_ptr
);
32 g4 (struct s
*param_ptr
)
34 f_indirect (param_ptr
);
42 struct s local
= param
;
50 struct s local
= param
;
55 /* Not a tail call. */
59 struct s local
= param
;
63 /* Not a tail call. */
65 g8 (struct s
*param_ptr
)
67 struct s local
= *param_ptr
;
71 /* Not a tail call. */
73 g9 (struct s
*param_ptr
)
75 struct s local
= *param_ptr
;
80 /* { dg-final { scan-tree-dump-times "Found tail call" 6 "tailc" } } */