Initial revision
[binutils.git] / ld / testsuite / ld-selective / 5.cc
blob5179d918481485b6fe380ec4b814b16a65278b9f
1 // This test currently fails because the C++ front end emits `A' as
2 // the base class called rather than `B' as it ought. At least it
3 // is erroring on the safe side...
5 struct A
7 virtual void foo();
8 virtual void bar();
9 };
11 void A::foo() { } // loose
12 void A::bar() { } // loose
14 struct B : public A
16 virtual void foo();
19 void B::foo() { } // keep
21 void _start() __asm__("_start"); // keep
23 A a;
24 B b; // keep
25 B *getme() { return &b; } // keep
27 void _start()
29 getme()->foo();
32 extern "C" void __main() { }