mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Bugfix and tests.
Co-authored-by: Kamil Śliwak <kamil.sliwak@codepoets.it>
This commit is contained in:
co-authored by
Kamil Śliwak
parent
d5e2925326
commit
a33da17300
@@ -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
|
||||
Reference in New Issue
Block a user