1 // { dg-do compile { target c++11 } }
2 // { dg-options -Wabi=10 }
4 struct [[gnu::abi_tag ("foo")]] A
6 template <class T> static T f();
7 template <class T> static A g();
10 template <class T> struct B
12 static decltype(A::f<T>()) fa(decltype(A::f<T>()));
13 static decltype(A::f<T>()) fv(); // { dg-warning "mangled name" }
14 static decltype(A::g<T>()) ga(decltype(A::g<T>()));
15 static decltype(A::g<T>()) gv();
17 static decltype(A::f<U>()) hv();
22 B<int>::fa(0); // { dg-final { scan-assembler "_ZN1BIiE2faEi" } }
23 B<int>::fv(); // { dg-final { scan-assembler "_ZN1BIiE2fvEv" } }
24 B<int>::ga(A()); // { dg-final { scan-assembler "_ZN1BIiE2gaE1AB3foo" } }
25 B<int>::gv(); // { dg-final { scan-assembler "_ZN1BIiE2gvB3fooEv" } }
26 B<int>::hv<int>(); // { dg-final { scan-assembler "_ZN1BIiE2hvIiEEDTclsr1AB3foo1fIT_EEEv" } }