OSDN Git Service

* c-common.h (lang_post_pch_load): New variable.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / abi / mangle4.C
1 // Test mangling of type casts
2 // { dg-do compile }
3
4 class A {};
5 class B : public A {};
6
7 template<const A* a> class C {};
8 template<const B* b> class D {};
9 template<B* b> class E {};
10
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 "" }
13
14 B b;
15
16 int main()
17 {
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);
23 }
24