Issue 165951
Summary [clang][bytecode] compilation hangs when possible infinite loop exists
Labels clang
Assignees
Reporter k-arrows
    Reproducer:
https://godbolt.org/z/9WfeabYTx
```cpp
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.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to