public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/13883] New: Assembler messages: symbol is already defined
@ 2004-01-27 10:57 mattyt-bugzilla at tpg dot com dot au
  2004-01-27 15:29 ` [Bug c++/13883] [3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: mattyt-bugzilla at tpg dot com dot au @ 2004-01-27 10:57 UTC (permalink / raw)
  To: gcc-bugs

The following code:

struct A {};
struct B;
 
template < class TP > struct X : virtual A {
  template < class TP2 > X (TP2* ptr) {}
  template < class TP2 > X (const X <TP2>) {}
};
 
struct Y : X <B> {
  Y (A* a) : X<B>(a) {}
};
 
void func1 (X <B>);
 
void func2 () {
  A a;
  Y y(&a);
  func1(X< A >(&a));
}

produces these messages:

/tmp/ccdER9OM.s: Assembler messages:
/tmp/ccdER9OM.s:125: Error: symbol `_ZN1XI1BEC2I1AEEv' is already defined

on Linux x86, with G++-3.4 branch from a day or two ago.

I'm not sure if the "const X <TP2>" is well formed (it doesn't seem to work in
the non-template form), but the original code wasn't like that, that's a figment
of the automatic testcase reduction I did - so perhaps there's two bugs here.

-- 
           Summary: Assembler messages: symbol is already defined
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mattyt-bugzilla at tpg dot com dot au
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug c++/13883] [3.4/3.5 Regression] Assembler messages: symbol is already defined
  2004-01-27 10:57 [Bug c++/13883] New: Assembler messages: symbol is already defined mattyt-bugzilla at tpg dot com dot au
@ 2004-01-27 15:29 ` pinskia at gcc dot gnu dot org
  2004-01-27 15:54 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-27 15:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-01-27 15:29 -------
"const X <TP2>" is well defined.  This is the only an ABI bug, but ABI bugs are targeted for 3.4.  
Also this is a regression also from 3.3.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |critical
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |ABI
      Known to fail|                            |3.4.0 3.5.0
      Known to work|                            |3.3
   Last reconfirmed|0000-00-00 00:00:00         |2004-01-27 15:29:28
               date|                            |
            Summary|Assembler messages: symbol  |[3.4/3.5 Regression]
                   |is already defined          |Assembler messages: symbol
                   |                            |is already defined
   Target Milestone|---                         |3.4.0


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


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

* [Bug c++/13883] [3.4/3.5 Regression] Assembler messages: symbol is already defined
  2004-01-27 10:57 [Bug c++/13883] New: Assembler messages: symbol is already defined mattyt-bugzilla at tpg dot com dot au
  2004-01-27 15:29 ` [Bug c++/13883] [3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
@ 2004-01-27 15:54 ` pinskia at gcc dot gnu dot org
  2004-01-29 16:47 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-27 15:54 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-01-27 15:54 -------
oh by the way _ZN1XI1BEC2I1AEEv demangled is X<B>::X<A>().  -funit-at-a-time or -finline are 
workarounds as either will cause one of the symbols not to be emitted.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code
      Known to work|3.3                         |3.3.1


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


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

* [Bug c++/13883] [3.4/3.5 Regression] Assembler messages: symbol is already defined
  2004-01-27 10:57 [Bug c++/13883] New: Assembler messages: symbol is already defined mattyt-bugzilla at tpg dot com dot au
  2004-01-27 15:29 ` [Bug c++/13883] [3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
  2004-01-27 15:54 ` pinskia at gcc dot gnu dot org
@ 2004-01-29 16:47 ` cvs-commit at gcc dot gnu dot org
  2004-01-29 16:49 ` cvs-commit at gcc dot gnu dot org
  2004-01-29 17:12 ` mmitchel at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-01-29 16:47 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-01-29 16:47 -------
Subject: Bug 13883

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	mmitchel@gcc.gnu.org	2004-01-29 16:47:14

Modified files:
	gcc/cp         : ChangeLog mangle.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/template: ctor3.C 

Log message:
	PR c++/13883
	* mangle.c (write_encoding): Correct encoding of member template
	constructors.
	
	PR c++/13883
	* g++.dg/template/ctor3.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3917&r2=1.3918
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/mangle.c.diff?cvsroot=gcc&r1=1.96&r2=1.97
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3439&r2=1.3440
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/ctor3.C.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug c++/13883] [3.4/3.5 Regression] Assembler messages: symbol is already defined
  2004-01-27 10:57 [Bug c++/13883] New: Assembler messages: symbol is already defined mattyt-bugzilla at tpg dot com dot au
                   ` (2 preceding siblings ...)
  2004-01-29 16:47 ` cvs-commit at gcc dot gnu dot org
@ 2004-01-29 16:49 ` cvs-commit at gcc dot gnu dot org
  2004-01-29 17:12 ` mmitchel at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-01-29 16:49 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-01-29 16:49 -------
Subject: Bug 13883

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	mmitchel@gcc.gnu.org	2004-01-29 16:49:47

Modified files:
	gcc/cp         : ChangeLog mangle.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/template: ctor3.C 

Log message:
	PR c++/13883
	* mangle.c (write_encoding): Correct encoding of member template
	constructors.
	
	PR c++/13883
	* g++.dg/template/ctor3.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3892.2.20&r2=1.3892.2.21
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/mangle.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.95.2.1&r2=1.95.2.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.29&r2=1.3389.2.30
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/ctor3.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1



-- 


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


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

* [Bug c++/13883] [3.4/3.5 Regression] Assembler messages: symbol is already defined
  2004-01-27 10:57 [Bug c++/13883] New: Assembler messages: symbol is already defined mattyt-bugzilla at tpg dot com dot au
                   ` (3 preceding siblings ...)
  2004-01-29 16:49 ` cvs-commit at gcc dot gnu dot org
@ 2004-01-29 17:12 ` mmitchel at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-01-29 17:12 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-01-29 17:11 -------
Fixed in GCC 3.4 and GCC 3.5.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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


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

end of thread, other threads:[~2004-01-29 17:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-27 10:57 [Bug c++/13883] New: Assembler messages: symbol is already defined mattyt-bugzilla at tpg dot com dot au
2004-01-27 15:29 ` [Bug c++/13883] [3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
2004-01-27 15:54 ` pinskia at gcc dot gnu dot org
2004-01-29 16:47 ` cvs-commit at gcc dot gnu dot org
2004-01-29 16:49 ` cvs-commit at gcc dot gnu dot org
2004-01-29 17:12 ` mmitchel 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).