https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123546
Bug ID: 123546
Summary: ICE in reference_binding with std::ref in member
initializer list
Product: gcc
Version: 13.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: valar at mail dot nwpu.edu.cn
Target Milestone: ---
The following program reports an internal compiler error
To quickly reproduce: https://gcc.godbolt.org/z/da9aKzP5Y
```
#include <iostream>
class bar
{
public:
bar(int &a)
: a {std::ref(a)}
{
}
int &get_a_ref()
{
return a;
}
private:
int &a;
};
int main()
{
return 0;
}
```