Bugfix and tests.

Co-authored-by: Kamil Śliwak <kamil.sliwak@codepoets.it>
This commit is contained in:
Daniel Kirchner
2022-09-08 11:54:14 +02:00
co-authored by Kamil Śliwak
parent d5e2925326
commit a33da17300
7 changed files with 164 additions and 2 deletions
@@ -0,0 +1,15 @@
contract C {
uint public x;
function f() public {
x = 1; // This write used to be removed by the Yul optimizer due to the StorageWriteRemovalBeforeConditionalTermination bug.
g();
x = 2;
}
function g() internal {
if (msg.data.length > 4) return;
assembly { return(0, 0) }
}
}
// ----
// f() ->
// x() -> 1