| 1 |
// { dg-do link } |
| 2 |
// { dg-options "-w -ansi -pedantic" } |
| 3 |
|
| 4 |
// Contributed by Nathan Sidwell 23 Oct 2003 <[email protected]> |
| 5 |
// Origin: [email protected] |
| 6 |
// PR c++/12698. Duplicate covariant thunks emitted. |
| 7 |
|
| 8 |
struct c1 {}; |
| 9 |
|
| 10 |
struct c0 { |
| 11 |
int i; |
| 12 |
virtual c1& f10() {} |
| 13 |
}; |
| 14 |
|
| 15 |
struct c2 : virtual c1, c0 { }; |
| 16 |
|
| 17 |
struct c6 : virtual c2, c0 { |
| 18 |
virtual c2& f10() {} |
| 19 |
}; |
| 20 |
|
| 21 |
struct c14 : virtual c2 { }; |
| 22 |
|
| 23 |
struct c19 : virtual ::c6 { |
| 24 |
virtual class ::c14& f10() {} |
| 25 |
}; |
| 26 |
|
| 27 |
int main () |
| 28 |
{ |
| 29 |
c19 obj; |
| 30 |
} |
| 31 |
|
| 32 |
|