aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-selective/4.cc
blob: 02864a731cd93111b411d11eaa02d56e41c0f7da (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
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

void _start()
{
  getme()->bar();
}

extern "C" void __main() { }