Merge from mainline (165734:167278).
[official-gcc/graphite-test-results.git] / gcc / testsuite / g++.dg / abi / covariant1.C
blob97737ddb94ce6a6e0f91ba4e9beddd13d7210876
1 // { dg-do compile }
2 // { dg-options "-w" }
4 // If a covariant thunk is overriding a virtual primary base, we have to
5 // use the vcall offset even though we know it will be 0.
7 struct c4 {};
9 struct c6 : c4 { virtual c4* f17(); };
11 c4* c6::f17() { return 0; }
13 struct c11 : virtual c6 { int i; };
15 struct c12 : c11 { };
17 struct c14 : 
18   virtual c12,
19   virtual c11 { virtual void f(); c12* f17(); };
21 void c14::f() { }
23 // { dg-final { scan-assembler "_ZTcv0_n12_v0_n16_N3c143f17Ev" { target { ilp32  && { ! { ia64-*-hpux* } } } } } }
24 // { dg-final { scan-assembler-not "_ZTch0_v0_n16_N3c143f17Ev" } }
25 // { dg-final { scan-assembler "_ZTcv0_n24_v0_n32_N3c143f17Ev" { target { lp64  || { ia64-*-hpux* } } } } }
26 // { dg-final { scan-assembler-not "_ZTch0_v0_n32_N3c143f17Ev" } }