Debian Codegraph @

gcc/testsuite/c-c++-common/musttail8.c

raw
1 /* { dg-do compile { target { musttail && { c || c++11 } } } } */
2
3 float f1(void);
4
5 int f2(void)
6 {
7 [[gnu::musttail]] return f1 (); /* { dg-error "changed after call" } */
8 }
9
10
11 int f3(int *);
12
13 int f4(int *p)
14 {
15 int x;
16 (void) p;
17 [[gnu::musttail]] return f3(&x); /* { dg-warning "address of automatic variable 'x' passed to 'musttail' call argument" } */
18 }