* [Bug c++/35067] [4.2 Regression] multiple definition of virtual thunk
2008-02-03 22:32 [Bug c++/35067] New: [4.2 Regression] multiple definition of virtual thunk vincent dot riviere at freesbee dot fr
@ 2008-02-03 22:36 ` pinskia at gcc dot gnu dot org
2008-02-03 22:57 ` vincent dot riviere at freesbee dot fr
` (16 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-02-03 22:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2008-02-03 22:35 -------
The virtual thunk should be link once in this case. Can you attach the
assembly files? Also how did you configure GCC?
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|major |normal
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35067
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug c++/35067] [4.2 Regression] multiple definition of virtual thunk
2008-02-03 22:32 [Bug c++/35067] New: [4.2 Regression] multiple definition of virtual thunk vincent dot riviere at freesbee dot fr
2008-02-03 22:36 ` [Bug c++/35067] " pinskia at gcc dot gnu dot org
@ 2008-02-03 22:57 ` vincent dot riviere at freesbee dot fr
2008-02-03 23:03 ` vincent dot riviere at freesbee dot fr
` (15 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: vincent dot riviere at freesbee dot fr @ 2008-02-03 22:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from vincent dot riviere at freesbee dot fr 2008-02-03 22:57 -------
This problem seems to happen on targets where ASM_WEAKEN_LABEL() is defined,
but MAKE_DECL_ONE_ONLY() is not defined. In that case, the `virtual
thunk to C::~C()' symbol is defined using .globl instead of using .weak (like
it was in 4.1.2).
I made some investigation. The problem may be related to these source files:
gcc/cp/methods.c in function use_thunk()
if (DECL_ONE_ONLY (function))
make_decl_one_only (thunk_fndecl);
This code was different in 4.1.2
gcc/varasm.c in function make_decl_one_only()
if (SUPPORTS_ONE_ONLY)
{
#ifdef MAKE_DECL_ONE_ONLY
MAKE_DECL_ONE_ONLY (decl);
#endif
DECL_ONE_ONLY (decl) = 1;
}
When MAKE_DECL_ONE_ONLY is not defined, SUPPORTS_ONE_ONLY is set to 0. So
DECL_ONE_ONLY (decl) = 1 is never called.
Thus if the destructor is flagged DECL_ONE_ONLY, the virtual thunk is not
flagged DECL_ONE_ONLY as it should, then it is defined with .globl instead of
.weak
--
vincent dot riviere at freesbee dot fr changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |4.2.3
Known to work| |4.1.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35067
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug c++/35067] [4.2 Regression] multiple definition of virtual thunk
2008-02-03 22:32 [Bug c++/35067] New: [4.2 Regression] multiple definition of virtual thunk vincent dot riviere at freesbee dot fr
2008-02-03 22:36 ` [Bug c++/35067] " pinskia at gcc dot gnu dot org
2008-02-03 22:57 ` vincent dot riviere at freesbee dot fr
@ 2008-02-03 23:03 ` vincent dot riviere at freesbee dot fr
2008-02-03 23:04 ` vincent dot riviere at freesbee dot fr
` (14 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: vincent dot riviere at freesbee dot fr @ 2008-02-03 23:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from vincent dot riviere at freesbee dot fr 2008-02-03 23:02 -------
Created an attachment (id=15090)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15090&action=view)
Output of f1.cpp
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35067
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug c++/35067] [4.2 Regression] multiple definition of virtual thunk
2008-02-03 22:32 [Bug c++/35067] New: [4.2 Regression] multiple definition of virtual thunk vincent dot riviere at freesbee dot fr
` (2 preceding siblings ...)
2008-02-03 23:03 ` vincent dot riviere at freesbee dot fr
@ 2008-02-03 23:04 ` vincent dot riviere at freesbee dot fr
2008-02-04 10:14 ` rguenth at gcc dot gnu dot org
` (13 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: vincent dot riviere at freesbee dot fr @ 2008-02-03 23:04 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from vincent dot riviere at freesbee dot fr 2008-02-03 23:03 -------
Created an attachment (id=15091)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15091&action=view)
Output of f2.cpp
I configured gcc with:
configure --target=i386-netbsd --disable-multilib --disable-nls
--enable-languages="c,c++"
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35067
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug c++/35067] [4.2 Regression] multiple definition of virtual thunk
2008-02-03 22:32 [Bug c++/35067] New: [4.2 Regression] multiple definition of virtual thunk vincent dot riviere at freesbee dot fr
` (3 preceding siblings ...)
2008-02-03 23:04 ` vincent dot riviere at freesbee dot fr
@ 2008-02-04 10:14 ` rguenth at gcc dot gnu dot org
2008-02-04 13:34 ` vincent dot riviere at freesbee dot fr
` (12 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-02-04 10:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from rguenth at gcc dot gnu dot org 2008-02-04 10:14 -------
Can you please check a recent gcc 4.3 snapshot?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35067
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug c++/35067] [4.2 Regression] multiple definition of virtual thunk
2008-02-03 22:32 [Bug c++/35067] New: [4.2 Regression] multiple definition of virtual thunk vincent dot riviere at freesbee dot fr
` (4 preceding siblings ...)
2008-02-04 10:14 ` rguenth at gcc dot gnu dot org
@ 2008-02-04 13:34 ` vincent dot riviere at freesbee dot fr
2008-02-04 13:36 ` [Bug c++/35067] [4.2/4.3 " rguenth at gcc dot gnu dot org
` (11 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: vincent dot riviere at freesbee dot fr @ 2008-02-04 13:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from vincent dot riviere at freesbee dot fr 2008-02-04 13:33 -------
Same problem with version 4.3-20080201
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35067
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug c++/35067] [4.2/4.3 Regression] multiple definition of virtual thunk
2008-02-03 22:32 [Bug c++/35067] New: [4.2 Regression] multiple definition of virtual thunk vincent dot riviere at freesbee dot fr
` (5 preceding siblings ...)
2008-02-04 13:34 ` vincent dot riviere at freesbee dot fr
@ 2008-02-04 13:36 ` rguenth at gcc dot gnu dot org
2008-02-04 13:39 ` vincent dot riviere at freesbee dot fr
` (10 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-02-04 13:36 UTC (permalink / raw)
To: gcc-bugs
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.2 Regression] multiple |[4.2/4.3 Regression]
|definition of virtual thunk |multiple definition of
| |virtual thunk
Target Milestone|--- |4.2.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35067
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug c++/35067] [4.2/4.3 Regression] multiple definition of virtual thunk
2008-02-03 22:32 [Bug c++/35067] New: [4.2 Regression] multiple definition of virtual thunk vincent dot riviere at freesbee dot fr
` (6 preceding siblings ...)
2008-02-04 13:36 ` [Bug c++/35067] [4.2/4.3 " rguenth at gcc dot gnu dot org
@ 2008-02-04 13:39 ` vincent dot riviere at freesbee dot fr
2008-02-04 14:03 ` vincent dot riviere at freesbee dot fr
` (9 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: vincent dot riviere at freesbee dot fr @ 2008-02-04 13:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from vincent dot riviere at freesbee dot fr 2008-02-04 13:38 -------
(In reply to comment #6)
Sorry, I messed up with the versions...
I'm going to check again the version 4.3 right now.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35067
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug c++/35067] [4.2/4.3 Regression] multiple definition of virtual thunk
2008-02-03 22:32 [Bug c++/35067] New: [4.2 Regression] multiple definition of virtual thunk vincent dot riviere at freesbee dot fr
` (7 preceding siblings ...)
2008-02-04 13:39 ` vincent dot riviere at freesbee dot fr
@ 2008-02-04 14:03 ` vincent dot riviere at freesbee dot fr
2008-02-05 20:31 ` jakub at gcc dot gnu dot org
` (8 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: vincent dot riviere at freesbee dot fr @ 2008-02-04 14:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from vincent dot riviere at freesbee dot fr 2008-02-04 14:02 -------
I confirm this problem is still present in GCC 4.3-20080201.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35067
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug c++/35067] [4.2/4.3 Regression] multiple definition of virtual thunk
2008-02-03 22:32 [Bug c++/35067] New: [4.2 Regression] multiple definition of virtual thunk vincent dot riviere at freesbee dot fr
` (8 preceding siblings ...)
2008-02-04 14:03 ` vincent dot riviere at freesbee dot fr
@ 2008-02-05 20:31 ` jakub at gcc dot gnu dot org
2008-05-19 20:33 ` [Bug c++/35067] [4.2/4.3/4.4 " jsm28 at gcc dot gnu dot org
` (7 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-02-05 20:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from jakub at gcc dot gnu dot org 2008-02-05 20:31 -------
This doesn't affect any primary/secondary platforms.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35067
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug c++/35067] [4.2/4.3/4.4 Regression] multiple definition of virtual thunk
2008-02-03 22:32 [Bug c++/35067] New: [4.2 Regression] multiple definition of virtual thunk vincent dot riviere at freesbee dot fr
` (9 preceding siblings ...)
2008-02-05 20:31 ` jakub at gcc dot gnu dot org
@ 2008-05-19 20:33 ` jsm28 at gcc dot gnu dot org
2009-03-31 20:18 ` [Bug c++/35067] [4.3/4.4/4.5 " jsm28 at gcc dot gnu dot org
` (6 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-05-19 20:33 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from jsm28 at gcc dot gnu dot org 2008-05-19 20:24 -------
4.2.4 is being released, changing milestones to 4.2.5.
--
jsm28 at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.2.4 |4.2.5
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35067
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug c++/35067] [4.3/4.4/4.5 Regression] multiple definition of virtual thunk
2008-02-03 22:32 [Bug c++/35067] New: [4.2 Regression] multiple definition of virtual thunk vincent dot riviere at freesbee dot fr
` (10 preceding siblings ...)
2008-05-19 20:33 ` [Bug c++/35067] [4.2/4.3/4.4 " jsm28 at gcc dot gnu dot org
@ 2009-03-31 20:18 ` jsm28 at gcc dot gnu dot org
2009-08-04 12:38 ` rguenth at gcc dot gnu dot org
` (5 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-03-31 20:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from jsm28 at gcc dot gnu dot org 2009-03-31 20:18 -------
Closing 4.2 branch.
--
jsm28 at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.2/4.3/4.4/4.5 Regression]|[4.3/4.4/4.5 Regression]
|multiple definition of |multiple definition of
|virtual thunk |virtual thunk
Target Milestone|4.2.5 |4.3.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35067
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug c++/35067] [4.3/4.4/4.5 Regression] multiple definition of virtual thunk
2008-02-03 22:32 [Bug c++/35067] New: [4.2 Regression] multiple definition of virtual thunk vincent dot riviere at freesbee dot fr
` (11 preceding siblings ...)
2009-03-31 20:18 ` [Bug c++/35067] [4.3/4.4/4.5 " jsm28 at gcc dot gnu dot org
@ 2009-08-04 12:38 ` rguenth at gcc dot gnu dot org
2009-11-03 21:21 ` jason at gcc dot gnu dot org
` (4 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-08-04 12:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from rguenth at gcc dot gnu dot org 2009-08-04 12:28 -------
GCC 4.3.4 is being released, adjusting target milestone.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.3.4 |4.3.5
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35067
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug c++/35067] [4.3/4.4/4.5 Regression] multiple definition of virtual thunk
2008-02-03 22:32 [Bug c++/35067] New: [4.2 Regression] multiple definition of virtual thunk vincent dot riviere at freesbee dot fr
` (12 preceding siblings ...)
2009-08-04 12:38 ` rguenth at gcc dot gnu dot org
@ 2009-11-03 21:21 ` jason at gcc dot gnu dot org
2009-11-04 19:56 ` jason at gcc dot gnu dot org
` (3 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-11-03 21:21 UTC (permalink / raw)
To: gcc-bugs
--
jason at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jason at gcc dot gnu dot org
|dot org |
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-11-03 21:21:25
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35067
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug c++/35067] [4.3/4.4/4.5 Regression] multiple definition of virtual thunk
2008-02-03 22:32 [Bug c++/35067] New: [4.2 Regression] multiple definition of virtual thunk vincent dot riviere at freesbee dot fr
` (13 preceding siblings ...)
2009-11-03 21:21 ` jason at gcc dot gnu dot org
@ 2009-11-04 19:56 ` jason at gcc dot gnu dot org
2009-11-04 20:09 ` jason at gcc dot gnu dot org
` (2 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-11-04 19:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from jason at gcc dot gnu dot org 2009-11-04 19:56 -------
Subject: Bug 35067
Author: jason
Date: Wed Nov 4 19:55:56 2009
New Revision: 153912
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=153912
Log:
PR c++/35067
* method.c (use_thunk): Check DECL_WEAK as well as
DECL_ONE_ONLY.
Added:
branches/gcc-4_4-branch/gcc/testsuite/g++.dg/abi/thunk5.C
Modified:
branches/gcc-4_4-branch/gcc/cp/ChangeLog
branches/gcc-4_4-branch/gcc/cp/method.c
branches/gcc-4_4-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35067
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug c++/35067] [4.3/4.4/4.5 Regression] multiple definition of virtual thunk
2008-02-03 22:32 [Bug c++/35067] New: [4.2 Regression] multiple definition of virtual thunk vincent dot riviere at freesbee dot fr
` (14 preceding siblings ...)
2009-11-04 19:56 ` jason at gcc dot gnu dot org
@ 2009-11-04 20:09 ` jason at gcc dot gnu dot org
2009-11-04 20:10 ` jason at gcc dot gnu dot org
2009-11-04 23:41 ` vincent dot riviere at freesbee dot fr
17 siblings, 0 replies; 19+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-11-04 20:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from jason at gcc dot gnu dot org 2009-11-04 20:08 -------
Subject: Bug 35067
Author: jason
Date: Wed Nov 4 20:08:44 2009
New Revision: 153913
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=153913
Log:
PR c++/35067
* method.c (use_thunk): Check DECL_WEAK as well as
DECL_ONE_ONLY.
Added:
branches/gcc-4_3-branch/gcc/testsuite/g++.dg/abi/thunk5.C
Modified:
branches/gcc-4_3-branch/gcc/cp/ChangeLog
branches/gcc-4_3-branch/gcc/cp/method.c
branches/gcc-4_3-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35067
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug c++/35067] [4.3/4.4/4.5 Regression] multiple definition of virtual thunk
2008-02-03 22:32 [Bug c++/35067] New: [4.2 Regression] multiple definition of virtual thunk vincent dot riviere at freesbee dot fr
` (15 preceding siblings ...)
2009-11-04 20:09 ` jason at gcc dot gnu dot org
@ 2009-11-04 20:10 ` jason at gcc dot gnu dot org
2009-11-04 23:41 ` vincent dot riviere at freesbee dot fr
17 siblings, 0 replies; 19+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-11-04 20:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #15 from jason at gcc dot gnu dot org 2009-11-04 20:10 -------
Fixed for 4.3.5, 4.4.3, 4.5.0. Vincent, can you verify that it works with the
current sources?
--
jason at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |WAITING
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35067
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug c++/35067] [4.3/4.4/4.5 Regression] multiple definition of virtual thunk
2008-02-03 22:32 [Bug c++/35067] New: [4.2 Regression] multiple definition of virtual thunk vincent dot riviere at freesbee dot fr
` (16 preceding siblings ...)
2009-11-04 20:10 ` jason at gcc dot gnu dot org
@ 2009-11-04 23:41 ` vincent dot riviere at freesbee dot fr
17 siblings, 0 replies; 19+ messages in thread
From: vincent dot riviere at freesbee dot fr @ 2009-11-04 23:41 UTC (permalink / raw)
To: gcc-bugs
------- Comment #16 from vincent dot riviere at freesbee dot fr 2009-11-04 23:41 -------
Hello, I've just tested with GCC trunk, it seems to be fixed !
Thanks, Jason.
--
vincent dot riviere at freesbee dot fr changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35067
^ permalink raw reply [flat|nested] 19+ messages in thread