public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "danglin at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/14607] New: [3.3 Regression] Duplicate symbol "vtable for node" in files div.o and env.o Date: Tue, 16 Mar 2004 17:19:00 -0000 [thread overview] Message-ID: <20040316171907.14607.danglin@gcc.gnu.org> (raw) The following errors occured building groff-1.19 on the above target with gcc version 3.3.4 20040306 (prerelease): g++ -O2 -s -o troff dictionary.o div.o env.o glyphuni.o input.o majorminor.o nod e.o number.o reg.o symbol.o unicode.o uniglyph.o uniuni.o /xxx/gnu/groff-1.19/ob jdir3.3/src/libs/libgroff/libgroff.a -lm /usr/ccs/bin/ld: Duplicate symbol "vtable for node" in files div.o and env.o /usr/ccs/bin/ld: Duplicate symbol "typeinfo for node" in files div.o and env.o /usr/ccs/bin/ld: Duplicate symbol "typeinfo name for node" in files div.o and en v.o /usr/ccs/bin/ld: Duplicate symbol "vtable for node" in files div.o and input.o /usr/ccs/bin/ld: Duplicate symbol "typeinfo for node" in files div.o and input.o /usr/ccs/bin/ld: Duplicate symbol "typeinfo name for node" in files div.o and in put.o /usr/ccs/bin/ld: Duplicate symbol "vtable for node" in files div.o and node.o /usr/ccs/bin/ld: Duplicate symbol "typeinfo for node" in files div.o and node.o /usr/ccs/bin/ld: Duplicate symbol "typeinfo name for node" in files div.o and no de.o The problem doesn't occur with gcc 3.0.3. I'm not sure of the the details as to when vtables should be emitted as global objects. The 3.3.4 assembler output has for example the following code in div.o: .IMPORT _ZTV4node,DATA ... .EXPORT _ZTV4node,DATA .align 8 _ZTV4node .word 0 .word _ZTI4node .word P%_ZN4nodeD1Ev .word P%_ZN4nodeD0Ev .word P%__cxa_pure_virtual .word P%_ZN4node17set_unformat_flagEv ... _ZN4nodeD1Ev .PROC .CALLINFO FRAME=64,NO_CALLS .ENTRY addil LR'_ZTV4node-$global$,%r27 ldo 64(%r30),%r30 ldo RR'_ZTV4node-$global$+8(%r1),%r1 ... The same code is duplicated in the assembler out put for env.cpp and input.cpp. The assembler output from 3.0.3 doesn't have or export the vtable for node. The table is only defined by input.o. The hppa1.1-hp-hpux10.20 port doesn't support weak symbols. In ports that support weak symbols, the vtables are weak avoiding this problem. I'm not sure of all the requirements for vtables. For example, can they be local to a translation unit and duplicated? -- Summary: [3.3 Regression] Duplicate symbol "vtable for node" in files div.o and env.o Product: gcc Version: 3.3.4 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: danglin at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: hppa1.1-hp-hpux10.20 GCC host triplet: hppa1.1-hp-hpux10.20 GCC target triplet: hppa1.1-hp-hpux10.20 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14607
next reply other threads:[~2004-03-16 17:19 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-03-16 17:19 danglin at gcc dot gnu dot org [this message] 2004-03-16 17:48 ` [Bug c++/14607] " pinskia at gcc dot gnu dot org 2004-06-11 22:22 ` pinskia at gcc dot gnu dot org 2004-06-11 22:40 ` dave at hiauly1 dot hia dot nrc dot ca 2004-06-11 22:45 ` Andrew Pinski 2004-06-11 22:45 ` pinskia at physics dot uc dot edu 2004-06-11 22:52 ` dave at hiauly1 dot hia dot nrc dot ca 2004-07-20 19:52 ` cvs-commit at gcc dot gnu dot org 2004-07-20 22:10 ` pinskia at gcc dot gnu dot org 2004-08-15 4:14 ` pinskia at gcc dot gnu dot org 2004-12-28 4:51 ` cvs-commit at gcc dot gnu dot org 2004-12-28 5:29 ` pinskia at gcc dot gnu dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20040316171907.14607.danglin@gcc.gnu.org \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).