| Issue |
165969
|
| Summary |
[clang][bytecode] new interpreter fails with case ranges inside constexpr function
|
| Labels |
clang:bytecode
|
| Assignees |
|
| Reporter |
k-arrows
|
Reproducer:
https://godbolt.org/z/KorssdanW
```cpp
constexpr int foo(int i) {
switch (i) {
case 11 ... 12:
return 4;
case 0 ... 9:
return 3;
default:
return 7;
}
}
static_assert(foo(-1) == 7, "");
```
When the above program is compiled with option `-fexperimental-new-constant-interpreter` enabled, it fails. When the option is disabled, it succeeds as expected.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs