a7860e76c9
PR c++/13342: * valops.c (value_full_object): Return early if real type is smaller than the enclosing type. gdb/testsuite * gdb.cp/destrprint.exp: New file. * gdb.cp/destrprint.cc: New file.
36 lines
266 B
C++
36 lines
266 B
C++
|
|
class Base
|
|
{
|
|
public:
|
|
int x, y;
|
|
|
|
Base() : x(0), y(1)
|
|
{
|
|
}
|
|
|
|
virtual ~Base()
|
|
{
|
|
// Break here.
|
|
}
|
|
};
|
|
|
|
class Derived : public Base
|
|
{
|
|
public:
|
|
int z;
|
|
|
|
Derived() : Base(), z(23)
|
|
{
|
|
}
|
|
|
|
~Derived()
|
|
{
|
|
}
|
|
};
|
|
|
|
int main()
|
|
{
|
|
Derived d;
|
|
|
|
return 0;
|
|
}
|