Reproducer:
https://godbolt.org/z/9WfeabYTx
constexpr int foo(int p) {
int t = 0;
while (1)
;
return t;
}
static_assert (foo (1) == 0, "");
When the above program is compiled with option -fexperimental-new-constant-interpreter enabled, it hangs. When the option is disabled, a compilation error is correctly reported as expected.