From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2961 invoked by alias); 14 Dec 2001 23:16:08 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 2927 invoked by uid 71); 14 Dec 2001 23:16:02 -0000 Date: Fri, 14 Dec 2001 15:16:00 -0000 Message-ID: <20011214231602.2926.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Robert Boehne Subject: Re: c++/4122: undefined reference to `non-virtual thunk to ...' Reply-To: Robert Boehne X-SW-Source: 2001-12/txt/msg00857.txt.bz2 List-Id: The following reply was made to PR c++/4122; it has been noted by GNATS. From: Robert Boehne To: gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org, juergen@monocerus.demon.co.uk, boehme@informatik.hu-berlin.de, loewis@informatik.hu-berlin.de, rboehne@ricardo-us.com, gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org, michael@ritzert.de Cc: jason_merrill@redhat.com Subject: Re: c++/4122: undefined reference to `non-virtual thunk to ...' Date: Fri, 14 Dec 2001 17:04:59 -0600 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 * 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