diff options
author | Richard Henderson <rth@redhat.com> | 1999-05-03 07:29:11 +0000 |
---|---|---|
committer | Richard Henderson <rth@redhat.com> | 1999-05-03 07:29:11 +0000 |
commit | 252b5132c753830d5fd56823373aed85f2a0db63 (patch) | |
tree | 1af963bfd8d3e55167b81def4207f175eaff3a56 /ld/testsuite/ld-selective/4.cc | |
download | gdb-252b5132c753830d5fd56823373aed85f2a0db63.zip gdb-252b5132c753830d5fd56823373aed85f2a0db63.tar.gz gdb-252b5132c753830d5fd56823373aed85f2a0db63.tar.bz2 |
19990502 sourceware importbinu_ss_19990502
Diffstat (limited to 'ld/testsuite/ld-selective/4.cc')
-rw-r--r-- | ld/testsuite/ld-selective/4.cc | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/ld/testsuite/ld-selective/4.cc b/ld/testsuite/ld-selective/4.cc new file mode 100644 index 0000000..9df26ac --- /dev/null +++ b/ld/testsuite/ld-selective/4.cc @@ -0,0 +1,28 @@ +struct A +{ + virtual void foo(); + virtual void bar(); +}; + +void A::foo() { } // loose +void A::bar() { } // keep + +struct B : public A +{ + virtual void foo(); +}; + +void B::foo() { } // loose + +void _start() __asm__("_start"); // keep + +A a; // keep +B b; +A *getme() { return &a; } // keep + +void _start() +{ + getme()->bar(); +} + +extern "C" void __main() { } |