1 // Testcase for mangling of parameters used other than in a trailing return type
2 // { dg-options -std=c++0x }
4 template<class T> void f(T p, decltype(p)) { } // L = 1
5 template<class T> void g(T p, decltype(p) (*)()) { } // L = 1
6 // G++ incorrectly rejects these currently.
7 // template<class T> void h(T p, auto (*)()->decltype(p)); // L = 1
8 // template<class T> void i(T p, auto (*)(T q)->decltype(q)); // L = 0
9 // template<class T> void j(T p, auto (*)(decltype(p))->T); // L = 2
10 template<class T> void k(T p, int (*(*)(T* p))[sizeof(p)]) {} // L = 1
13 int (*karg (int*))[sizeof(int)];
16 // { dg-final { scan-assembler "_Z1fIiEvT_DtfL0p_E" } }
18 // { dg-final { scan-assembler "_Z1gIiEvT_PFDtfL0p_EvE" } }
23 // { dg-final { scan-assembler "_Z1kIiEvT_PFPAszfL0p__iPS0_E" } }