The Yul optimizer can remove essential assignments to variables declared inside for
loops when Yul's continue
or break
statement is used mostly while using inline assembly with for
loops and continue
and break
statements. This is due to a compiler bug introduced in v0.5.8
/v0.6.0
and fixed in v0.5.16
/v0.6.1
. (see here)
- Essential Assignments Removed
- YUL Optimizer Variable -> for Loops
- continue/break Assignments -> Removed
- Compiler Bug -> Fixed
solc 0.5.8/0.6.0
-> 0.5.16/0.6.1