Commit 249e490
committed
Fix constant evaluation of && and ||
The "return" in the for loop should have been a break on the switch,
otherwise the result is just ignored... but because it prevents
evaluation of the other operand, it also violates the invariant that
everything has been constant evaluated, resulting in an assertion
failure.
The for loop isn't correct in any case though, because it's not legal
to determine the result based on just the second operand, as the
first one may have a side-effect that cannot be optimized away.1 parent fac43d6 commit 249e490
2 files changed
+24
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8549 | 8549 | | |
8550 | 8550 | | |
8551 | 8551 | | |
8552 | | - | |
8553 | | - | |
8554 | | - | |
8555 | | - | |
8556 | | - | |
8557 | | - | |
8558 | | - | |
8559 | | - | |
8560 | | - | |
| 8552 | + | |
| 8553 | + | |
| 8554 | + | |
| 8555 | + | |
| 8556 | + | |
8561 | 8557 | | |
8562 | 8558 | | |
8563 | | - | |
| 8559 | + | |
| 8560 | + | |
| 8561 | + | |
| 8562 | + | |
| 8563 | + | |
| 8564 | + | |
| 8565 | + | |
8564 | 8566 | | |
8565 | 8567 | | |
8566 | 8568 | | |
| 8569 | + | |
8567 | 8570 | | |
8568 | | - | |
| 8571 | + | |
8569 | 8572 | | |
8570 | | - | |
| 8573 | + | |
8571 | 8574 | | |
8572 | 8575 | | |
8573 | 8576 | | |
| |||
0 commit comments