1999-05-03 07:29:11 +00:00
|
|
|
struct A
|
|
|
|
{
|
|
|
|
virtual void foo();
|
|
|
|
virtual void bar();
|
|
|
|
};
|
|
|
|
|
2000-09-28 22:57:26 +00:00
|
|
|
void A::foo() { } // lose
|
1999-05-03 07:29:11 +00:00
|
|
|
void A::bar() { } // keep
|
|
|
|
|
|
|
|
struct B : public A
|
|
|
|
{
|
|
|
|
virtual void foo();
|
|
|
|
};
|
|
|
|
|
2000-09-28 22:57:26 +00:00
|
|
|
void B::foo() { } // lose
|
1999-05-03 07:29:11 +00:00
|
|
|
|
|
|
|
void _start() __asm__("_start"); // keep
|
|
|
|
|
|
|
|
A a; // keep
|
|
|
|
B b;
|
|
|
|
A *getme() { return &a; } // keep
|
|
|
|
|
|
|
|
void _start()
|
|
|
|
{
|
|
|
|
getme()->bar();
|
|
|
|
}
|
|
|
|
|
|
|
|
extern "C" void __main() { }
|