Control flow for short-circuiting operators
Open
cfg
- Dominant language
- Python
- Stars
- 6.4k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
It seems like slithIR does not handle control flow for short-circuiting operators (&&, ||)
Example:
```
Expression: e = (a == 1) || (((c = 5) + b) == 6)
IRs:
TMP_1(bool) = a == 1
c(uint256) := 5(uint256)
TMP_2(uint256) = c + b
TMP_3(bool) = TMP_2 == 6
TMP_4(bool) = TMP_1 || TMP_3
e(bool) := TMP_4(bool)
```
This basic block here is incorrect, as c should only be getting set to 5 when a!=1
Contributor guide
Assessment
This issue has not been assessed yet.