1 // More auto/decltype mangling tests.
2 // { dg-do compile { target c++11 } }
3 // { dg-options "-fabi-version=0" }
20 auto f(U u) -> decltype (u + i);
22 auto fr(U u) -> decltype (u + ir);
24 auto frr(U u) -> decltype (u + irr);
26 auto g(U u) -> decltype (u + sizeof (i));
28 auto h(U u) -> decltype (u + B<U>::i);
30 auto j(U u) -> decltype (u + x());
33 template<class T> template<class U>
34 auto A<T>::f(U u) -> decltype (u + i)
39 template <class... Args>
42 template <class... Args>
43 auto g (Args... args) -> decltype (f ((args+1)...))
45 return (f ((args+1)...));
50 // { dg-final { scan-assembler "_ZN1AIiE1fIiEEDTplfp_L_ZNS0_1iEEET_" } }
52 // { dg-final { scan-assembler "_ZN1AIiE2frIiEEDTplfp_L_ZNS0_2irEEET_" } }
54 // { dg-final { scan-assembler "_ZN1AIiE3frrIiEEDTplfp_L_ZNS0_3irrEEET_" } }
56 // { dg-final { scan-assembler "_ZN1AIiE1gIiEEDTplfp_szL_ZNS0_1iEEET_" } }
58 // { dg-final { scan-assembler "_ZN1AIiE1hIiEEDTplfp_sr1BIT_E1iES3_" } }
60 // { dg-final { scan-assembler "_ZN1AIiE1jIiEEDTplfp_clL_Z1xvEEET_" } }
62 // { dg-final { scan-assembler "_Z1gIJidEEDTcl1fspplfp_Li1EEEDpT_" } }