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