OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [binutils-2.20.1/] [ld/] [testsuite/] [ld-selective/] [5.cc] - Rev 297

Go to most recent revision | Compare with Previous | Blame | View Log

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
void start() __asm__("start"); // some toolchains use this name.
 
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();
}
 
void start ()
{
  _start ();
}
 
extern "C" void __main() { }
 

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.