Add inlining for old optimizer.

This commit is contained in:
Daniel Kirchner
2021-02-09 19:08:58 +01:00
parent e777cad78a
commit cb74a45fd6
43 changed files with 1463 additions and 74 deletions
@@ -0,0 +1,17 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.0;
function unsafe_inc(uint x) pure returns (uint)
{
unchecked {
return x + 1;
}
}
contract C {
function f() public pure {
for(uint x = 0; x < 10; x = unsafe_inc(x))
{
}
}
}