https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107161
--- Comment #2 from Ivan Sorokin <vanyacpp at gmail dot com> ---
> Do constexpr/consteval work in such circumstances?
Yes, constexpr works for variables like "p.a":
extern constexpr mytype p = {1, 2};
int foo()
{
constexpr int t = p.a + 10;
return t;
}
foo():
mov eax, 11
ret
https://godbolt.org/z/K9a69E4ar
