cp-tree.h (DECL_PARM_LEVEL): New.
[gcc.git] / gcc / testsuite / g++.dg / abi / mangle45.C
1 // Testcase for mangling of parameters used other than in a trailing return type
2 // { dg-options -std=c++0x }
3
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
11
12 int garg();
13 int (*karg (int*))[sizeof(int)];
14 int main()
15 {
16 // { dg-final { scan-assembler "_Z1fIiEvT_DtfL0p_E" } }
17 f (1,0);
18 // { dg-final { scan-assembler "_Z1gIiEvT_PFDtfL0p_EvE" } }
19 g (1,garg);
20 // h (1,0);
21 // i (1,0);
22 // j (1,0);
23 // { dg-final { scan-assembler "_Z1kIiEvT_PFPAszfL0p__iPS0_E" } }
24 k (1,karg);
25 }