This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/13883] New: Assembler messages: symbol is already defined


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]