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 IR-based codegen allocated more memory for the struct. After optimization, the IR-based codegen should allocate less memory?
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract BugTest { struct Complex { uint256 x; bytes32 y; address z; } function testBug() public { Complex memory a = Complex({ x: 123456, y: keccak256(abi.encodePacked("test")), z: address(0x1234567890123456789012345678901234567890) }); bytes memory encoded = abi.encode(a); assembly { let p := mload(0x40) sstore(p, 1) } } }
storage:
{'388': '1'}
{'416': '1'}
The IR-based codegen's free memory pointer is positioned further back.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
The IR-based codegen allocated more memory for the struct. After optimization, the IR-based codegen should allocate less memory?
Environment
Steps to Reproduce
Legacy Codegen
storage:
IR-based Codegen
storage:
The IR-based codegen's free memory pointer is positioned further back.
The text was updated successfully, but these errors were encountered: