[Bug c++/20357] New: Multiply defined assembler symbols for template instantiations

heinlein at informatik dot uni-ulm dot de gcc-bugzilla@gcc.gnu.org
Mon Mar 7 09:49:00 GMT 2005


The following code produces the assembler message: 
"Error: symbol `_ZN1XIXadL_Z1fvEEEC1Ev' is already defined". 
If the declaration of f in main is omitted, everything is fine. 
 
typedef void (*Func) (); 
template <Func f> 
struct X { X () {} }; 
void f () {} 
X<f> x; 
int main () { 
  void f (); 
  X<f> x; 
}

-- 
           Summary: Multiply defined assembler symbols for template
                    instantiations
           Product: gcc
           Version: 3.3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: heinlein at informatik dot uni-ulm dot de
                CC: gcc-bugs at gcc dot gnu dot org


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



More information about the Gcc-bugs mailing list