2000-09-28 22:57:26 +00:00
|
|
|
struct A
|
|
|
|
{
|
|
|
|
virtual void foo();
|
|
|
|
virtual void bar();
|
|
|
|
};
|
|
|
|
|
|
|
|
void A::foo() { } // lose
|
|
|
|
void A::bar() { } // keep
|
|
|
|
|
|
|
|
struct B : public A
|
|
|
|
{
|
|
|
|
virtual void foo();
|
|
|
|
};
|
|
|
|
|
|
|
|
void B::foo() { } // lose
|
|
|
|
|
|
|
|
void _start() __asm__("_start"); // keep
|
2003-04-30 12:07:19 +00:00
|
|
|
void start() __asm__("start"); // some toolchains use this name.
|
2000-09-28 22:57:26 +00:00
|
|
|
|
|
|
|
A a; // keep
|
|
|
|
B b;
|
|
|
|
A *getme() { return &a; } // keep
|
|
|
|
|
|
|
|
extern B* dropme2();
|
|
|
|
void dropme1() { dropme2()->foo(); } // lose
|
|
|
|
B *dropme2() { return &b; } // lose
|
|
|
|
|
|
|
|
void _start()
|
|
|
|
{
|
|
|
|
getme()->bar();
|
|
|
|
}
|
|
|
|
|
2003-04-30 12:07:19 +00:00
|
|
|
void start ()
|
|
|
|
{
|
|
|
|
_start ();
|
|
|
|
}
|
|
|
|
|
2000-09-28 22:57:26 +00:00
|
|
|
extern "C" void __main() { }
|