source: trunk/binutils/ld/testsuite/ld-selective/5.cc

Last change on this file was 610, checked in by bird, 22 years ago

This commit was generated by cvs2svn to compensate for changes in r609,
which included commits to RCS files with non-trunk default branches.

  • Property cvs2svn:cvs-rev set to 1.1.1.2
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 560 bytes
Line 
1struct A
2{
3 virtual void foo();
4 virtual void bar();
5};
6
7void A::foo() { } // lose
8void A::bar() { } // keep
9
10struct B : public A
11{
12 virtual void foo();
13};
14
15void B::foo() { } // lose
16
17void _start() __asm__("_start"); // keep
18void start() __asm__("start"); // some toolchains use this name.
19
20A a; // keep
21B b;
22A *getme() { return &a; } // keep
23
24extern B* dropme2();
25void dropme1() { dropme2()->foo(); } // lose
26B *dropme2() { return &b; } // lose
27
28void _start()
29{
30 getme()->bar();
31}
32
33void start ()
34{
35 _start ();
36}
37
38extern "C" void __main() { }
Note: See TracBrowser for help on using the repository browser.