URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.mike/] [misc14.C] - Rev 154
Compare with Previous | Blame | View Log
// { dg-do run }
// GROUPS passed
extern "C" int printf (const char *, ...);
extern "C" void exit(int);
class A {
public:
virtual ~A() {
printf("FAIL\n");
exit (1);
}
};
class B : public A {
public:
virtual ~B() {
printf("PASS\n");
exit (0);
}
};
int main() {
B b;
A *ap = &b;
ap->~A(); // This should call the destructor virtually.
printf("FAIL\n");
return 1;
}