You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When writing a large number to memory, the legacy codegen successfully optimizes out the mstore statement without causing the program to revert. However, the IR-based codegen, abicoder v1, and Ast import will cause the program to revert.
Environment
Compiler version: 0.8.27
Target EVM version (as per compiler settings): None
contractC{
function test() publicreturns (bool) {
assembly {
let x :=calldataload(0)
let y :=sload(x)
let ax := x
let bx :=mload(ax)
mstore(ax, bx)
}
returntrue;
}
}
Description
When writing a large number to memory, the legacy codegen successfully optimizes out the mstore statement without causing the program to revert. However, the IR-based codegen, abicoder v1, and Ast import will cause the program to revert.
Environment
Steps to Reproduce
Get bin
AST import
Abicoder v1
add pragma abicoder v1; in solidity program
IR-based codegen
Legacy codegen
origin
Run in evm
The text was updated successfully, but these errors were encountered: