blob: 31e62165e7ce653353610e20a42e01a6357c4cfc [file] [log] [blame]
// PR c++/47873
// { dg-do run }
struct Base
{
virtual ~Base(){}
virtual Base& This() { return *this; }
};
struct Ent : virtual Base
{
void *m_Body;
Ent& This() { return *this; }
virtual Ent& body()
{
return This();
}
};
struct Msg : virtual Ent
{
Msg()
{
body();
}
Msg& This() { return *this; }
};
int main()
{
Msg m;
return 0;
}