]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/cp/class.c
re PR c++/3145 (virtual inheritance still creates wrong code)
authorNathan Sidwell <nathan@codesourcery.com>
Sun, 25 Nov 2001 13:21:45 +0000 (13:21 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Sun, 25 Nov 2001 13:21:45 +0000 (13:21 +0000)
commit338d90b89f23deaa5ce2ae80b8adf9cb52808679
tree0d461fab9e84fd53ebc0b813e9c60b27eb83f6e0
parent92fa4733ab20d5f4a8e9eb7c6f5c924427677549
re PR c++/3145 (virtual inheritance still creates wrong code)

cp:
PR g++/3145
* class.c (build_vbase_pointer): Remove.
(build_vbase_path): Remove.
(build_base_path): New function.
* cp-tree.h (base_access, base_kind): New enumerations.
(build_base_path): Declare.
(convert_pointer_to_real): Remove.
(convert_pointer_to): Remove.
(lookup_base): Declare.
(convert_pointer_to_vbase): Remove.
* call.c (build_scoped_method_call): Use lookup_base &
build_base_path instead of convert_pointer_to_real,
get_base_distance & get_binfo.
(build_over_call): Likewise.
* cvt.c (cp_convert_to_pointer): Likewise.
(convert_to_pointer_force): Likewise.
(build_up_reference): Likewise.
(convert_pointer_to_real): Remove.
(convert_pointer_to): Remove.
* init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
instead of convert_pointer_to_vbase & build_vbase_path.
(emit_base_init): Use build_base_path instead of
convert_pointer_to_real.
(expand_virtual_init): Lose unrequired conversions.
(resolve_offset_ref): Use lookup_base and build_base_path
instead of convert_pointer_to.
* rtti.c (build_dynamic_cast_1): Use lookup_base &
build_base_path instead of get_base_distance & build_vbase_path.
* search.c (get_vbase_1): Remove.
(get_vbase): Remove.
(convert_pointer_to_vbase): Remove.
(lookup_base_recursive): New function.
(lookup_base): New function.
* typeck.c (require_complete_type): Use lookup_base &
build_base_path instead of convert_pointer_to.
(build_component_ref): Likewise.
(build_x_function_call): Likewise.
(get_member_function_from_ptrfunc): Likewise.
(build_component_addr): Likewise.
* typeck2.c (build_scoped_ref): Likewise.
testsuite:
* g++.dg/abi/vbase8-4.C: New test.

From-SVN: r47316
12 files changed:
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/class.c
gcc/cp/cp-tree.h
gcc/cp/cvt.c
gcc/cp/init.c
gcc/cp/rtti.c
gcc/cp/search.c
gcc/cp/typeck.c
gcc/cp/typeck2.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/abi/vbase8-4.C [new file with mode: 0644]