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++.other/] [dcast2.C] - Rev 154
Compare with Previous | Blame | View Log
// { dg-do assemble }
// Based on a testcase by Ruslan Shevchenko <Ruslan@Shevchenko.Kiev.UA>
struct B {
virtual ~B();
};
struct D : public B {
};
void foo() {
B x;
dynamic_cast<D*>(&x); // { dg-warning "" } will never succeed
B* p = &x;
dynamic_cast<D*>(p);
}