This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/20357] New: Multiply defined assembler symbols for template instantiations
- From: "heinlein at informatik dot uni-ulm dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Mar 2005 09:49:42 -0000
- Subject: [Bug c++/20357] New: Multiply defined assembler symbols for template instantiations
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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