https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127392
Bug ID: 127392
Summary: [reflection] missing "consteval-only value" error for
reference init
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: mpolacek at gcc dot gnu.org
Target Milestone: ---
This is an XFAIL in reflect/value1.C:
```
constexpr auto r = ^^int;
void
g ()
{
const int &ref = (r, 42);
}
```
should produce an error but doesn't. grok_reference_init turns the init into
`(const int &) &D.2686` and so store_init_value won't see any consteval-only
value.