#include <cstdio>
struct Base
{
virtual ~Base() {}
};
struct X1 : public virtual Base {};
struct X2 : public virtual Base {};
struct Child : public X1, public X2 {};
int main()
{
X1 * p1 = new X1();
delete p1;
Base * p2;
p2 = p1;
printf("p2 = %p\r\n", (void *)p2);
return 0;
}
I2luY2x1ZGUgPGNzdGRpbz4KCnN0cnVjdCBCYXNlCnsKICAgIHZpcnR1YWwgfkJhc2UoKSB7fQp9OwoKc3RydWN0IFgxIDogcHVibGljIHZpcnR1YWwgQmFzZSB7fTsKc3RydWN0IFgyIDogcHVibGljIHZpcnR1YWwgQmFzZSB7fTsKc3RydWN0IENoaWxkIDogcHVibGljIFgxLCBwdWJsaWMgWDIge307CgppbnQgbWFpbigpCnsKICAgIFgxICogcDEgPSBuZXcgWDEoKTsKICAgIGRlbGV0ZSBwMTsKICAgIEJhc2UgKiBwMjsKICAgIHAyID0gcDE7CiAgICBwcmludGYoInAyID0gJXBcclxuIiwgKHZvaWQgKilwMik7CiAgICByZXR1cm4gMDsKfQo=