| 1 |
// PR c++/117114 - Reduced version of another bootstrap error |
| 2 |
// Unrelated methods can have the same DECL_VINDEX when the class hierarchy |
| 3 |
// depth is 2 or more. |
| 4 |
// { dg-do compile { target c++11 } } |
| 5 |
// { dg-additional-options -Woverloaded-virtual } |
| 6 |
|
| 7 |
class HIRFullVisitor; |
| 8 |
class HIRTypeVisitor; |
| 9 |
|
| 10 |
struct FullVisitable { |
| 11 |
virtual void accept_vis (HIRFullVisitor &vis) = 0; |
| 12 |
}; |
| 13 |
|
| 14 |
struct Node { |
| 15 |
virtual ~Node() {} |
| 16 |
}; |
| 17 |
|
| 18 |
struct Type : Node, FullVisitable |
| 19 |
{ |
| 20 |
using FullVisitable::accept_vis; |
| 21 |
virtual void accept_vis (HIRTypeVisitor &vis) = 0; |
| 22 |
}; |
| 23 |
|
| 24 |
struct TypePath : Type |
| 25 |
{ |
| 26 |
void accept_vis (HIRFullVisitor &vis) override; |
| 27 |
void accept_vis (HIRTypeVisitor &vis) override; |
| 28 |
}; |