aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/musttail20.c
blob: 70f14ff2f217c018337d788161c3a1e23d0165cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* { dg-do compile { target { struct_musttail && { c || c++11 } } } } */
/* { dg-additional-options "-fdelayed-branch" { target sparc*-*-* } } */

struct str
{
  int a, b;
};
struct str
cstruct (int x)
{
  if (x < 10)
    L:
    __attribute__((musttail)) return cstruct (x + 1);	/* { dg-warning "'musttail' attribute ignored" "" { target c } } */
  return ((struct str){ x, 0 });
}