This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: as: error 7403: undefined label - _ZTVN10__cxxabiv120__si_class_type_infoE [was Re: fix execute/20010518-2.c]
- To: dave at hiauly1 dot hia dot nrc dot ca (John David Anglin)
- Subject: Re: as: error 7403: undefined label - _ZTVN10__cxxabiv120__si_class_type_infoE [was Re: fix execute/20010518-2.c]
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Date: Tue, 28 Aug 2001 16:58:44 -0400 (EDT)
- Cc: rth at redhat dot com, mark at codesourcery dot com, gcc-bugs at gcc dot gnu dot org
> > A work around is to include <cxxabi.h>. If this is the correct solution,
> > then a lot of code needs fixing.
I have done a little more investigation. This is the problematic code
from import_export_vtable:
/* We can only wait to decide if we have real non-inline virtual
functions in our class, or if we come from a template. */
int found = (CLASSTYPE_TEMPLATE_INSTANTIATION (type)
|| key_method (type));
if (final || ! found)
{
comdat_linkage (decl);
DECL_EXTERNAL (decl) = 0;
}
else
{
TREE_PUBLIC (decl) = 1;
DECL_EXTERNAL (decl) = 1;
}
When cxxabi.h is included, there is always a method for the standard abi
type info types (found is true). The causes TREE_PUBLIC and DECL_EXTERNAL
to be set and a .IMPORT statement is generated. When the header is not
included, there are no methods and we get comdat linkage.
The two fixes that I see are:
1) Build the standard methods equivalent to those in cxxabi.h internally
in cc1plus (your not supposed to have to include cxxabi.h), or
2) Check to see if `type' is one of the standard typeinfo types and set
TREE_PUBLIC and DECL_EXTERNAL accordingly.
Thoughts?
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)