https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113021
--- Comment #3 from Miro Palmu <miro.palmu at helsinki dot fi> ---
Here is even more reduced. Notice that if the unused data member `pointer` is
removed from `vec` the problem goes away. Same with data member `a` in struct
`A`.
```
struct vec {
int data;
int* pointer; // This is required for compilation to fail
constexpr vec() {
data = 42;
}
};
struct A {
vec v;
int a; // This is required for compilation to fail
};
consteval auto foo() {
A temp1{{}, 42}; // This compiles fine
const A tmp2{{}, 42}; // This does not
}
int main() {
foo();
}
```