https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93314
--- Comment #1 from Language Lawyer <language.lawyer at gmail dot com> --- GCC thinks that `char[S::m]` is VLA (because the lvalue-to-rvalue conversion on `S::m` lvalue doesn't look like a constant expression) and tries to move the evaluation of `sizeof(char[S::m])` to run time. $ g++ prog.cc -pedantic prog.cc: In function 'int main()': prog.cc:4:28: warning: ISO C++ forbids variable length array [-Wvla] 4 | return sizeof(char[S::m]); | ^ prog.cc:4:27: internal compiler error: in gimplify_expr, at gimplify.c:14581 4 | return sizeof(char[S::m]); | ...