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/5.cc | |
download | binutils-gdb-252b5132c753830d5fd56823373aed85f2a0db63.tar.gz |
19990502 sourceware importbinu_ss_19990502
Diffstat (limited to 'ld/testsuite/ld-selective/5.cc')
-rw-r--r-- | ld/testsuite/ld-selective/5.cc | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/ld/testsuite/ld-selective/5.cc b/ld/testsuite/ld-selective/5.cc new file mode 100644 index 00000000000..5179d918481 --- /dev/null +++ b/ld/testsuite/ld-selective/5.cc @@ -0,0 +1,32 @@ +// This test currently fails because the C++ front end emits `A' as +// the base class called rather than `B' as it ought. At least it +// is erroring on the safe side... + +struct A +{ + virtual void foo(); + virtual void bar(); +}; + +void A::foo() { } // loose +void A::bar() { } // loose + +struct B : public A +{ + virtual void foo(); +}; + +void B::foo() { } // keep + +void _start() __asm__("_start"); // keep + +A a; +B b; // keep +B *getme() { return &b; } // keep + +void _start() +{ + getme()->foo(); +} + +extern "C" void __main() { } |