From 71b1859a782cdd1a3156e2a5f99be3bb9b5218d4 Mon Sep 17 00:00:00 2001 From: nathan Date: Mon, 30 Dec 2002 13:39:48 +0000 Subject: cp: * cp-tree.h (THUNK_TARGET): New macro. (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo. (finish_thunk): Remove offset parms. * class.c (find_final_overrider): Look through thunks. (get_vcall_index): Use THUNK_TARGET. (update_vtable_entry_for_fn): Look through thunks. Set covariant fixed offset here. Adjust finish_thunk call. (build_vtbl_initializer): Adjust finish_thunk calls. * mangle.c (mangle_call_offset): Remove superfluous if. (mangle_thunk): Adjust. * method.c (make_thunk): Adjust. (finish_thunk): Adjust. (thunk_adjust): Remove assert. (use_thunk): Use THUNK_TARGET * dump1.c (cp_dump_tree): Adjust thunk dumping. testsuite: * g++.dg/inherit/covariant5.C: New test. * g++.dg/inherit/covariant6.C: New test. * g++.dg/inherit/covariant7.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@60628 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/dump.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'gcc/cp/dump.c') diff --git a/gcc/cp/dump.c b/gcc/cp/dump.c index da207d32917..bb842bdcae2 100644 --- a/gcc/cp/dump.c +++ b/gcc/cp/dump.c @@ -336,13 +336,20 @@ cp_dump_tree (dump_info, t) } else { + tree virt = THUNK_VIRTUAL_OFFSET (t); + dump_string (di, "thunk"); if (DECL_THIS_THUNK_P (t)) dump_string (di, "this adjusting"); else - dump_string (di, "result adjusting"); + { + dump_string (di, "result adjusting"); + if (virt) + virt = BINFO_VPTR_FIELD (virt); + } dump_int (di, "fixd", THUNK_FIXED_OFFSET (t)); - dump_child ("virt", THUNK_VIRTUAL_OFFSET (t)); + if (virt) + dump_int (di, "virt", tree_low_cst (virt, 0)); dump_child ("fn", DECL_INITIAL (t)); } break; -- cgit v1.2.1