| Issue |
56436
|
| Summary |
C++20 coroutine miscompiled if it contains a dispatch table + computed goto
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
vogelsgesang
|
Repro: https://godbolt.org/z/j3o96sYd1
clang trunk accepts the program, but miscompiles it.
gcc trunk compiles the program correctly.
The program implements a simple interpreter using the a dispatch table as described, e.g., in https://eli.thegreenplace.net/2012/07/12/computed-goto-for-efficient-dispatch-tables.
The problem only occurs when combining coroutines with a dispatch table and a computed goto. A switch-based interpreter works as expected.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs