blob: bd6effa4b9314eea8dfde661dd7fa22748fa8dbe [file] [log] [blame]
/* { dg-do compile { target { musttail && { c || c++11 } } } } */
struct box { char field[64]; int i; };
struct box __attribute__((noinline,noclone,noipa))
returns_struct (int i)
{
struct box b;
b.i = i * i;
return b;
}
int __attribute__((noinline,noclone))
test_1 (int i)
{
[[gnu::musttail]] return returns_struct (i * 5).i; /* { dg-error "cannot tail-call: " } */
}