This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/12698] Multiple definition of covariant thunk in the single unit
- From: "cvs-commit at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Oct 2003 07:59:49 -0000
- Subject: [Bug c++/12698] Multiple definition of covariant thunk in the single unit
- References: <20031021045355.12698.grigory@stl.sarov.ru>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12698
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2003-10-24 07:59 -------
Subject: Bug 12698
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: nathan@gcc.gnu.org 2003-10-24 07:59:42
Modified files:
gcc/cp : ChangeLog class.c cp-tree.h decl.c method.c
pt.c semantics.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/inherit: covariant9.C covariant10.C
covariant11.C
Log message:
cp:
PR c++/12698, c++/12699, c++/12700, c++/12566
* cp-tree.h (THUNK_ALIAS_P, THUNK_ALIAS): New.
(debug_class, debug_thunks): New.
* class.c (dump_class_hierarchy_1): New break out from ...
(dump_class_hierarchy): ... here.
(dump_thunk, debug_thunks, debug_class): New.
(update_vtable_entry_for_fn): Add ssizetype casts. Correct
continued search for primary binfo via virtual.
(build_vtbl_initializer): Follow covariant thunk alias.
* method.c (make_thunk): Clear DECL_THUNKS of the thunk.
(finish_thunk): Look for an alias of the covariant thunk and point
to it.
(use_thunk): We should never use an alias.
* semantics.c (emit_associated_thunks): Do not emit aliases.
PR c++/12566
* cp-tree.h (cp_fname_init): Add TYPE pointer param.
* decl.c (cp_fname_init): Add TYPE pointer param. Set it. Don't
create an ad-hoc ERROR_MARK.
(cp_make_fname_decl): Adjust.
* pt.c (tsubst_expr): Adjust.
testsuite:
PR c++/12698, c++/12699, c++/12700, c++/12566
* g++.dg/inherit/covariant9.C: New test.
* g++.dg/inherit/covariant10.C: New test.
* g++.dg/inherit/covariant11.C: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3743&r2=1.3744
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/class.c.diff?cvsroot=gcc&r1=1.579&r2=1.580
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-tree.h.diff?cvsroot=gcc&r1=1.929&r2=1.930
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&r1=1.1149&r2=1.1150
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/method.c.diff?cvsroot=gcc&r1=1.269&r2=1.270
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&r1=1.790&r2=1.791
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/semantics.c.diff?cvsroot=gcc&r1=1.370&r2=1.371
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3140&r2=1.3141
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/inherit/covariant9.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/inherit/covariant10.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/inherit/covariant11.C.diff?cvsroot=gcc&r1=NONE&r2=1.1