1 /* { dg-do compile { target { struct_musttail } } } */
2 /* { dg-require-effective-target external_musttail } */
3 /* A lot of architectures will not build this due to PR115606 and PR115607 */
4 /* { dg-options "-std=gnu++11" } */
5 /* { dg-additional-options "-fdelayed-branch" { target sparc*-*-* } } */
10 Foo(int a, int b) : a(a), b(b) {}
13 Foo __attribute__((noinline,noclone,noipa))
19 Foo __attribute__((noinline,noclone,noipa))
22 [[gnu::musttail]] return callee (i + 1);
26 T __attribute__((noinline,noclone,noipa)) foo (T i)
34 [[gnu::musttail]] return foo<int>(1);
40 [[gnu::musttail]] return foo<T>(v);
45 [[gnu::musttail]] return caller3<int>(i + 1);
51 Bar operator+(Bar o) { return Bar(a + o.a); }
58 [[gnu::musttail]] return caller3<Bar>(Bar(99));