aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/musttail12.c
blob: 475afc5af3f31dffc3b27e1ebb4d2ceffa14f9bf (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:
    [[gnu::musttail]] return cstruct (x + 1);
  return ((struct str){ x, 0 });
}