This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: c++/4122: undefined reference to `non-virtual thunk to ...'


http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=4122

Hello,

I've tracked this problem down to the changes applied on June 6, 2001 in
the gcc-3_0-branch that correspond to this ChangeLog entry:

2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
 
        * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
        (struct lang_decl_flags): Lose generate_with_vtable_p.
        (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
        * class.c (copy_virtuals): Adjust.
        * decl2.c (mark_vtable_entries): Adjust.
        * method.c (make_thunk, build_vtable_entry): Adjust.
        * class.c (update_vtable_entry_for_fn): Only look as far as the
        first defining class.
        (build_vtbl_initializer): Put nothing in the slot for a function
only
        defined in a lost primary virtual base.
        (add_vcall_offset_vtbl_entries_1): Use the same code for
        the lost primary case and the normal case.
        (dfs_unshared_virtual_bases): Don't lose a non-virtual primary
base.
        (get_vfield_offset, get_derived_offset): Lose.
        (dfs_find_final_overrider): Use look_for_overrides_here.
        (get_matching_virtual): New fn.
        * semantics.c (emit_associated_thunks): Check
BV_USE_VCALL_INDEX_P,
        not BV_VCALL_INDEX.
        * search.c (look_for_overrides_here): Split out from...
        (look_for_overrides_r): Here.
 
        * class.c (find_final_overrider): Return error_mark_node on
error.

This problem is present in all releases of 3.0 as well as CVS head.
My uninitiated eye can't definitively say, but it looks suspicious
that a macro named "THUNK_GENERATE_WITH_VTABLE_P" was removed in
this patch.  I hope to have a valid patch to fix this problem before
year's end, but I won't be the least bit upset if someone else
figures this out before I do.  Any insight into the problem would
be appreciated.  I determined this by checking out the branch
with -rgcc-3_0-branch -D "June 6, 2001 4:00pm" and bootstrapping,
then attempting to compile the i2.cpp example attached to the PR in
GNATS (which compiles and runs without error) then updating cvs
by another four hours (-rgcc-3_0-branch -D "June 6, 2001 8:00pm")
and repeating.

Thanks,

Robert Boehne


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]