https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125196
Bug ID: 125196
Summary: same values but different types initializer_list are
not shared
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: pinskia at gcc dot gnu.org
Target Milestone: ---
```
#include <initializer_list>
void f1(std::initializer_list<int> il);
void f2(std::initializer_list<unsigned> il);
void t() {
f1({3, 1, 4, 1, 3, 1, 4, 1, 3, 1, 4, 1, 3, 1, 4, 1});
f2({3, 1, 4, 1, 3, 1, 4, 1, 3, 1, 4, 1, 3, 1, 4, 1});
}
```
Currently the constant backing the 2 initializer_list are not shared even
though we could share them.