We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The optimizer incorrectly removes sstore instructions in initialization code when followed by a call to an undefined internal function (foo()).
sstore
foo()
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; contract A { function() internal foo; constructor(uint256 x, bytes memory) { assembly { sstore(1, x) } foo(); } }
$ solc-select install 0.8.12 && solc-select use 0.8.12 Installing solc '0.8.12'... Version '0.8.12' installed. Switched global version to 0.8.12 $ solc --optimize --ir-optimized src/A.sol | grep sstore sstore(1, var_x) $ solc-select install 0.8.13 && solc-select use 0.8.13 Installing solc '0.8.13'... Version '0.8.13' installed. Switched global version to 0.8.13 $ solc --optimize --ir-optimized src/A.sol | grep sstore # (no match) $ solc-select install 0.8.28 && solc-select use 0.8.28 Installing solc '0.8.28'... Version '0.8.28' installed. Switched global version to 0.8.28 $ solc --optimize --ir-optimized src/A.sol | grep sstore # (no match)
Expected behavior: find sstore in the ir-optimized output. Actual behavior: the sstore is missing from the ir-optimized output with solc 0.8.28.
It worked as expected in 0.8.12 but from 0.8.13 to 0.8.28, the sstore is missing from the ir-optimized output
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
The optimizer incorrectly removes
sstore
instructions in initialization code when followed by a call to an undefined internal function (foo()
).Environment
Steps to Reproduce
Expected behavior: find sstore in the ir-optimized output.
Actual behavior: the sstore is missing from the ir-optimized output with solc 0.8.28.
It worked as expected in 0.8.12 but from 0.8.13 to 0.8.28, the sstore is missing from the ir-optimized output
The text was updated successfully, but these errors were encountered: