public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/38581]  New: Tru64 outputs non-virtual thunks as non-weak symbols
@ 2008-12-19 21:27 bugzilla-gcc at thewrittenword dot com
  2008-12-19 22:31 ` [Bug c++/38581] " bugzilla-gcc at thewrittenword dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: bugzilla-gcc at thewrittenword dot com @ 2008-12-19 21:27 UTC (permalink / raw)
  To: gcc-bugs

When building qt-3.3.8 and wxGTk on Tru64 UNIX 5.1
(alphaev67-dec-osf5.1) with gcc-4.2.4, we got linker failures about
duplicate non-virtual thunks, e.g. from qt:
/usr/ccs/bin/ld:
.obj/release-shared-mt/qmotifdnd_x11.o: non-virtual thunk to
QDragMoveEvent::~QDragMoveEvent(): multiply defined
.obj/release-shared-mt/qmotifdnd_x11.o: non-virtual thunk to
QDragMoveEvent::~QDragMoveEvent(): multiply defined
.obj/release-shared-mt/qmotifdnd_x11.o: non-virtual thunk to
QDragEnterEvent::~QDragEnterEvent(): multiply defined
.obj/release-shared-mt/qmotifdnd_x11.o: non-virtual thunk to
QDragEnterEvent::~QDragEnterEvent(): multiply defined

This appears to be because the non-virtual thunks are not output weak on this
platform, so, those that appear in multiple objects will cause linker errors
like this (in the above case, there are _ZThn16_N14QDragMoveEventD0Ev and
_ZThn16_N14QDragMoveEventD1Ev in both qdnd_x11.o and qmotifdnd_x11.o).

This is easily reproducible, for example, compiling a slightly modified version
of dllexport-MI1.C from the g++ testsuite.

With gcc-4.2.4:
% g++ -c -o dllexport-MI1.o dllexport-MI1.C; nm -wB dllexport-MI1.o | grep Thn
0x00000000000000 N  $_ZThn8_N3MI1D0Ev..ng
0x00000000000000 N  $_ZThn8_N3MI1D1Ev..ng
0x00000000000000 N  $_ZThn8_NK3MI12vfEv..ng
0x00000000000854 T  _ZThn8_N3MI1D0Ev
0x00000000000910 T  _ZThn8_N3MI1D1Ev
0x00000000000208 T  _ZThn8_NK3MI12vfEv

When compared to gcc-3.4.3:
g++ -c -o dllexport-MI1.o dllexport-MI1.C; nm -wB dllexport-MI1.o | grep Thn    
0x00000000000000 N  $_ZThn8_N3MI1D0Ev..ng
0x00000000000000 N  $_ZThn8_N3MI1D1Ev..ng
0x00000000000000 N  $_ZThn8_NK3MI12vfEv..ng
0x00000000000344 T* _ZThn8_N3MI1D0Ev
0x00000000000548 T* _ZThn8_N3MI1D1Ev
0x000000000001f0 T* _ZThn8_NK3MI12vfEv

The '*' in the nm output indicates a weak symbol.


-- 
           Summary: Tru64 outputs non-virtual thunks as non-weak symbols
           Product: gcc
           Version: 4.2.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bugzilla-gcc at thewrittenword dot com
  GCC host triplet: alphaev67-dec-osf5.1


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38581


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/38581] Tru64 outputs non-virtual thunks as non-weak symbols
  2008-12-19 21:27 [Bug c++/38581] New: Tru64 outputs non-virtual thunks as non-weak symbols bugzilla-gcc at thewrittenword dot com
@ 2008-12-19 22:31 ` bugzilla-gcc at thewrittenword dot com
  2008-12-30  1:47 ` [Bug target/38581] " bugzilla-gcc at thewrittenword dot com
  2009-09-29 22:12 ` ubizjak at gmail dot com
  2 siblings, 0 replies; 4+ messages in thread
From: bugzilla-gcc at thewrittenword dot com @ 2008-12-19 22:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from bugzilla-gcc at thewrittenword dot com  2008-12-19 22:30 -------
Created an attachment (id=16948)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16948&action=view)
preprocessed file to demonstrate the problem

The "slightly modified" version of dllexport-MI1.C (really just removed the
__attribute__ ((dllexport)), as they caused warnings).


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38581


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug target/38581] Tru64 outputs non-virtual thunks as non-weak symbols
  2008-12-19 21:27 [Bug c++/38581] New: Tru64 outputs non-virtual thunks as non-weak symbols bugzilla-gcc at thewrittenword dot com
  2008-12-19 22:31 ` [Bug c++/38581] " bugzilla-gcc at thewrittenword dot com
@ 2008-12-30  1:47 ` bugzilla-gcc at thewrittenword dot com
  2009-09-29 22:12 ` ubizjak at gmail dot com
  2 siblings, 0 replies; 4+ messages in thread
From: bugzilla-gcc at thewrittenword dot com @ 2008-12-30  1:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from bugzilla-gcc at thewrittenword dot com  2008-12-30 01:46 -------
http://gcc.gnu.org/ml/gcc-patches/2005-12/msg01905.html caused the regression


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38581


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug target/38581] Tru64 outputs non-virtual thunks as non-weak symbols
  2008-12-19 21:27 [Bug c++/38581] New: Tru64 outputs non-virtual thunks as non-weak symbols bugzilla-gcc at thewrittenword dot com
  2008-12-19 22:31 ` [Bug c++/38581] " bugzilla-gcc at thewrittenword dot com
  2008-12-30  1:47 ` [Bug target/38581] " bugzilla-gcc at thewrittenword dot com
@ 2009-09-29 22:12 ` ubizjak at gmail dot com
  2 siblings, 0 replies; 4+ messages in thread
From: ubizjak at gmail dot com @ 2009-09-29 22:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from ubizjak at gmail dot com  2009-09-29 22:12 -------
4.2.4 is not supported anymore. Please try with newer gcc.


-- 

ubizjak at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |WONTFIX


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38581


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-09-29 22:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-19 21:27 [Bug c++/38581] New: Tru64 outputs non-virtual thunks as non-weak symbols bugzilla-gcc at thewrittenword dot com
2008-12-19 22:31 ` [Bug c++/38581] " bugzilla-gcc at thewrittenword dot com
2008-12-30  1:47 ` [Bug target/38581] " bugzilla-gcc at thewrittenword dot com
2009-09-29 22:12 ` ubizjak at gmail dot com

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).