This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: other/4878: gcc 3.0.2 output crashes HP-UX linker
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: gcc-bugs at gcc dot gnu dot org
- Cc: porten at trolltech dot com
- Date: Wed, 14 Nov 2001 17:56:00 -0500 (EST)
- Subject: Re: other/4878: gcc 3.0.2 output crashes HP-UX linker
[Get raw message]
> The following piece of code will crash HP's system linker
> (B.10.37) when trying to build a shared library:
>
> struct X { virtual ~X(); };
> struct Y { virtual void foo(); };
> struct W : public X, public Y { virtual void foo(); };
> struct Q : public W { };
> void bar() { Q q; }
>
> I know it mustn't be gcc's fault as /usr/bin/ld is at
> least partly guilty because of it's fatal reaction.
> But where is the real problem ?
> >How-To-Repeat:
> g++ -shared -fPIC crash.cpp
Adding -Wl,-v to the above g++ command somehow prevents ld from dumping
core and provides this bit of additional information:
...
Searching library /usr/lib/milli.a:
/usr/ccs/bin/ld: Unsatisfied symbols:
vtable for W(data)
vtable for X(data)
vtable for Y(data)
W::foo() (code)
X::~X() (code)
non-virtual thunk to W::foo()(data)
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)