URL
https://opencores.org/ocsvn/scarts/scarts/trunk
Subversion Repositories scarts
[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.law/] [visibility28.C] - Rev 12
Compare with Previous | Blame | View Log
// { dg-do assemble }
// GROUPS passed visibility
extern "C" int printf( const char *, ...);
class B {
public:
B() { }
virtual ~B() { printf( "B::~B\n"); }
};
class D : public B {
public:
virtual ~D() { printf( "D::~D\n"); }
void operator = ( int i) { this->~B(); }
};
int
main()
{
D * pd = new D;
B * pb = pd;
delete pb;
return 0;
}