Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / g++.dg / abi / mangle4.C
blob3ce224716db5be5763d86215f19bd0d2df11007d
1 // Test mangling of type casts
2 // { dg-do compile }
4 class A {};
5 class B : public A {};
7 template<const A* a> class C {};
8 template<const B* b> class D {};
9 template<B* b> class E {};
11 template<const B* b> void f(D<b> &, C<static_cast<const A*>(b)> &) {} // { dg-error "" }
12 template<const B* b> void g(D<b> &, E<const_cast<B*>(b)> &) {} // { dg-error "" }
14 B b;
16 int main()
18   C<static_cast<const A*>(&b)> c; // { dg-error "" }
19   D<&b> d;
20   E<const_cast<B*>(&b)> e; // { dg-error "" }
21   f(d, c);
22   g(d, e);