public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/12698] New: Multiple definition of covariant thunk in the single unit
@ 2003-10-21 5:21 grigory at stl dot sarov dot ru
2003-10-21 13:32 ` [Bug c++/12698] " bangerth at dealii dot org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: grigory at stl dot sarov dot ru @ 2003-10-21 5:21 UTC (permalink / raw)
To: gcc-bugs
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
Summary: Multiple definition of covariant thunk in the single
unit
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: grigory at stl dot sarov dot ru
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-redhat-linux
GCC host triplet: i686-redhat-linux
GCC target triplet: i686-redhat-linux
Compiling the test-case listed below, g++ 3.4 gives multiple definition of a
covariant thunk. Two symbols with the same name are emitted in the asm source
so assembler fails in the end. Probably the second thunk definition appeared
due to incorrect offset encoding.
Failure appear both on i686-redhat-linux and ia64-suse-linux.
$ cat thunk.cpp
struct c1 {};
struct c0 {
int i;
virtual c1& f10() {};
};
struct c2 : virtual c1, c0 { };
struct c6 : virtual c2, c0 {
virtual c2& f10() {};
};
struct c14 : virtual c2 { };
struct c19 : virtual ::c6 {
virtual class ::c14& f10() {};
};
c19 obj;
$ g++ -c thunk.cpp
thunk.cpp:10: warning: direct base `c0' inaccessible in `c6' due to ambiguity
/home/grigory/tmp/cc8J96E3.s: Assembler messages:
/home/grigory/tmp/cc8J96E3.s:357: Error: symbol `_ZTch0_v0_n12_N3c193f10Ev' is
already defined
/home/grigory/tmp/cc8J96E3.s:405: Error: symbol `_ZTcv0_n20_v0_n12_N3c193f10Ev'
is already defined
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/12698] Multiple definition of covariant thunk in the single unit
2003-10-21 5:21 [Bug c++/12698] New: Multiple definition of covariant thunk in the single unit grigory at stl dot sarov dot ru
@ 2003-10-21 13:32 ` bangerth at dealii dot org
2003-10-21 13:50 ` nathan at gcc dot gnu dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: bangerth at dealii dot org @ 2003-10-21 13:32 UTC (permalink / raw)
To: gcc-bugs
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
bangerth at dealii dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |nathan at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2003-10-21 13:31:24
date| |
------- Additional Comments From bangerth at dealii dot org 2003-10-21 13:31 -------
Confirmed. This is not a regression, though, since previous
versions of gcc did not support covariant return thunks at
all.
Nathan, IIRC you implemented covariant return thunks -- would
you mind to take a look?
W.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/12698] Multiple definition of covariant thunk in the single unit
2003-10-21 5:21 [Bug c++/12698] New: Multiple definition of covariant thunk in the single unit grigory at stl dot sarov dot ru
2003-10-21 13:32 ` [Bug c++/12698] " bangerth at dealii dot org
@ 2003-10-21 13:50 ` nathan at gcc dot gnu dot org
2003-10-24 7:59 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: nathan at gcc dot gnu dot org @ 2003-10-21 13:50 UTC (permalink / raw)
To: gcc-bugs
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
nathan at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |nathan at gcc dot gnu dot
|dot org |org
Severity|normal |critical
Status|NEW |ASSIGNED
Priority|P2 |P1
------- Additional Comments From nathan at gcc dot gnu dot org 2003-10-21 13:49 -------
this is probably ABI problem, so uping priority
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/12698] Multiple definition of covariant thunk in the single unit
2003-10-21 5:21 [Bug c++/12698] New: Multiple definition of covariant thunk in the single unit grigory at stl dot sarov dot ru
2003-10-21 13:32 ` [Bug c++/12698] " bangerth at dealii dot org
2003-10-21 13:50 ` nathan at gcc dot gnu dot org
@ 2003-10-24 7:59 ` cvs-commit at gcc dot gnu dot org
2003-10-24 8:09 ` nathan at gcc dot gnu dot org
2003-12-04 9:46 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-10-24 7:59 UTC (permalink / raw)
To: gcc-bugs
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/12698] Multiple definition of covariant thunk in the single unit
2003-10-21 5:21 [Bug c++/12698] New: Multiple definition of covariant thunk in the single unit grigory at stl dot sarov dot ru
` (2 preceding siblings ...)
2003-10-24 7:59 ` cvs-commit at gcc dot gnu dot org
@ 2003-10-24 8:09 ` nathan at gcc dot gnu dot org
2003-12-04 9:46 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: nathan at gcc dot gnu dot org @ 2003-10-24 8:09 UTC (permalink / raw)
To: gcc-bugs
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
nathan at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
------- Additional Comments From nathan at gcc dot gnu dot org 2003-10-24 08:08 -------
2003-10-24 Nathan Sidwell <nathan@codesourcery.com>
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/12698] Multiple definition of covariant thunk in the single unit
2003-10-21 5:21 [Bug c++/12698] New: Multiple definition of covariant thunk in the single unit grigory at stl dot sarov dot ru
` (3 preceding siblings ...)
2003-10-24 8:09 ` nathan at gcc dot gnu dot org
@ 2003-12-04 9:46 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-12-04 9:46 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |3.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12698
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-12-04 9:46 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-21 5:21 [Bug c++/12698] New: Multiple definition of covariant thunk in the single unit grigory at stl dot sarov dot ru
2003-10-21 13:32 ` [Bug c++/12698] " bangerth at dealii dot org
2003-10-21 13:50 ` nathan at gcc dot gnu dot org
2003-10-24 7:59 ` cvs-commit at gcc dot gnu dot org
2003-10-24 8:09 ` nathan at gcc dot gnu dot org
2003-12-04 9:46 ` pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).