Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 20357
Product:  
Component:  
Status: NEW
Resolution:
Assigned To: Not yet assigned to anyone <unassigned@gcc.gnu.org>
Host:
Reported against  
Priority:  
Severity:  
Target Milestone:  
 
 
Target:
Reporter: Christian Heinlein <christian@heinleins.net>
Add CC:
CC:
Remove selected CCs
Build:
URL:
Summary:
Keywords:
Known to work:
Known to fail:

Attachment Description Type Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 20357 depends on: 26757 Show dependency tree
Show dependency graph
Bug 20357 blocks:

Additional Comments:





Mark bug as waiting for feedback
Mark bug as suspended




View Bug Activity   |   Format For Printing   |   Clone This Bug


Description:   Last confirmed: 2006-08-10 20:16 Opened: 2005-03-07 09:49
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; 
}

------- Comment #1 From Kriang Lerdsuwanakij 2005-03-07 14:29 -------
Confirm as a bug.  It's still present in the mainline.

------- Comment #2 From Andrew Pinski 2005-03-07 15:11 -------
What is happening here is that multiple decls for f is getting in the way. 
Either we have to look at the 
DECL_UID or change the C++ front-end to only have one decl for f.

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug