If a condition is always zero/non-zero we can omit the then or else code. This is complicated a bit by having to deal with labels that might make such code reachable without us yet knowing during parsing.
Showing the changes to tests/tests2/87_dead_code.expect (1 of 4 files). Show all
Unified · Split
| @@ -0,0 +1,18 @@ | ||
| 1 | +timeout=2 | |
| 2 | +timeout=1 | |
| 3 | +boo | |
| 4 | +yeah | |
| 5 | +twice | |
| 6 | +once | |
| 7 | +twice | |
| 8 | +SEtwice | |
| 9 | +SEonce | |
| 10 | +SEtwice | |
| 11 | +twice2 | |
| 12 | +once2 | |
| 13 | +twice2 | |
| 14 | +twice3 | |
| 15 | +once3 | |
| 16 | +twice3 | |
| 17 | +caseok | |
| 18 | +caseok2 | |