diff options
| author | Justus Klausecker <justus@klausecker.de> | 2025-07-13 16:53:39 +0200 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2025-07-14 09:59:13 -0700 |
| commit | 29ac68b2537b9a9c67f92cc2a5dd4c35bf1c2b31 (patch) | |
| tree | a05c443ab692add1dabd0f504d28c5ca21e9ef01 /test/behavior/switch_loop.zig | |
| parent | f43f89a70588c2add2a7c84d12eef2852d215f51 (diff) | |
| download | zig-29ac68b2537b9a9c67f92cc2a5dd4c35bf1c2b31.tar.gz zig-29ac68b2537b9a9c67f92cc2a5dd4c35bf1c2b31.zip | |
Sema: Fix invalid AIR generation for switch loop with comptime discarded tag
Add an additional check before emitting `.loop_switch_br` instead
of `.switch_br` in a tagged switch statement for whether any of the
continues referencing its tag are actually runtime reachable.
This fixes triggering an assertion in Liveness caused by the invalid
assumption that every tagged switch must be a loop if its tag is
referenced in any way even if this reference is not runtime reachable.
Diffstat (limited to 'test/behavior/switch_loop.zig')
0 files changed, 0 insertions, 0 deletions
