aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/musttail19.c
blob: a592b69c1b7c620281559b5692baabfc1b7fd2dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* { dg-do compile { target musttail } } */

float f1(void);

int f2(void)
{
  __attribute__((musttail)) return f1 (); /* { dg-error "changed after call" } */
}


int f3(int *);

int f4(int *p)
{
  int x;
  (void) p;
  __attribute__((musttail)) return f3(&x); /* { dg-warning "address of automatic variable 'x' passed to 'musttail' call argument" } */
}