aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-selective/5.cc
blob: f5289f874a79378199b1501c0b97b2047d343cf7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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

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();
}

extern "C" void __main() { }