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

float f1(void);

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


int f3(int *);

int f4(void)
{
  int x;
  [[gnu::musttail]] return f3(&x); /* { dg-error "\(refers to locals|other reasons\)" } */
}