This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH Re: c++/4122: undefined reference to `non-virtual thunk to ...'
- From: law at redhat dot com
- To: Jason Merrill <jason at redhat dot com>
- Cc: Robert Boehne <rboehne at ricardo-us dot com>, gcc-gnats at gcc dot gnu dot org, juergen at monocerus dot demon dot co dot uk, boehme at informatik dot hu-berlin dot de, loewis at informatik dot hu-berlin dot de, gcc-bugs at gcc dot gnu dot org, michael at ritzert dot de, gcc-patches at gcc dot gnu dot org
- Date: Sat, 22 Dec 2001 10:47:59 -0700
- Subject: Re: PATCH Re: c++/4122: undefined reference to `non-virtual thunk to ...'
- Reply-to: law at redhat dot com
> Yep, this was for a target-independent problem, not the HPUX-specific ones.
>
> > I'll try to get you testcases for both these issues today.
OK. Here's a testcase for the missing .import statements.
Compile the attached testcase with -O2 for hppa2.0-hp-hpux1.00 (you can
probably
build a cross-cc1plus for this instead of messing with a native compiler).
Note
this is with the 2002r1 branch from Red Hat's internal repository. I have
not tried it in the mainline sources.
If you look at the assembly output, you'll find something like this:
.word P%_ZTv0_n28_N18CdlUserVisibleBodyD0Ev
The problem is we need to explicitly import _ZTv0_n28_N18CdlUserVisibleBodyD0Ev
since it's defined in a different compilation unit. Usually the lack of an
import is related to a missing assemble_external call.
jeff