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

2024-03-24 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=20357

--- Comment #3 from Andrew Pinski  ---
Just for reference here is the ICE that is produced:
```
:10:1: error: Two symbols with same comdat_group are not linked by the
same_comdat_group list.
   10 | }
  | ^
_ZN1XIXadL_Z1fvEEEC1Ev/8 (X::X() [with void (* f)() = f])
  Type: function definition analyzed alias cpp_implicit_alias
  Visibility: semantic_interposition public weak comdat
comdat_group:_ZN1XIXadL_Z1fvEEEC5Ev one_only
  Same comdat group as: _ZN1XIXadL_Z1fvEEEC2Ev/7
  previous sharing asm name: 5
  References: _ZN1XIXadL_Z1fvEEEC2Ev/7 (alias) 
  Referring: 
  Function flags:
  Called by: main/2 
  Calls: 
_ZN1XIXadL_Z1fvEEEC1Ev/5 (X::X() [with void (* f)() = f])
  Type: function definition analyzed alias cpp_implicit_alias
  Visibility: semantic_interposition public weak comdat
comdat_group:_ZN1XIXadL_Z1fvEEEC5Ev one_only
  Same comdat group as: _ZN1XIXadL_Z1fvEEEC2Ev/4
  next sharing asm name: 8
  References: _ZN1XIXadL_Z1fvEEEC2Ev/4 (alias) 
  Referring: 
  Function flags:
  Called by: _Z41__static_initialization_and_destruction_0v/9 
  Calls: 

```

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

2005-03-07 Thread lerdsuwa at gcc dot gnu dot org

--- Additional Comments From lerdsuwa at gcc dot gnu dot org  2005-03-07 
14:29 ---
Confirm as a bug.  It's still present in the mainline.

-- 
   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed||1
   Last reconfirmed|-00-00 00:00:00 |2005-03-07 14:29:51
   date||


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


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

2005-03-07 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  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.

-- 
   What|Removed |Added

 CC||pinskia at gcc dot gnu dot
   ||org


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