1 /* { dg-do compile { target tail_call } } */
2 /* Allow nested functions. */
3 /* { dg-options "-Wno-pedantic" } */
5 struct box
{ char field
[64]; int i
; };
7 struct box
__attribute__((noinline
,noclone
))
15 int __attribute__((noinline
,noclone
))
18 return returns_struct (i
* 5).i
; /* { dg-error "cannot tail-call: " } */
21 int __attribute__((noinline
,noclone
))
22 test_2_callee (int i
, struct box b
)
29 int __attribute__((noinline
,noclone
))
33 return test_2_callee (i
+ 1, b
); /* { dg-error "cannot tail-call: " } */
36 extern void setjmp (void);
40 setjmp (); /* { dg-error "cannot tail-call: " } */
49 nested (); /* { dg-error "cannot tail-call: " } */
52 typedef void (fn_ptr_t
) (void);
53 volatile fn_ptr_t fn_ptr
;
58 fn_ptr (); /* { dg-error "cannot tail-call: " } */