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
pragma solidity^0.8.0;
contractC {
struct S { uint x; }
uint[] storageArray;
bytes memoryArray;
function g(uintx) public {
for (uint i =0; i < x; ++i) {
storageArray.push(i);
}
}
function f(uinta) publicreturns (uint, uint) {
if (a >1) {
g(a);
assembly {
let temp :=sload(storageArray.slot)
sstore(temp, msize())
}
}
memoryArray =abi.encode(storageArray);
return (storageArray.length, storageArray[0]);
}
}
solc --via-ir --bin test.sol
Uncaught exception:
/solidity/libyul/backends/evm/EVMObjectCompiler.cpp(125): Throw in function void solidity::yul::EVMObjectCompiler::run(const solidity::yul::Object&, bool)
Dynamic exception type: boost::wrapexcept<solidity::yul::StackTooDeepError>
std::exception::what: Variable var__38 is 11 slot(s) too deep inside the stack. Stack too deep. Try compiling with `--via-ir` (cli) or the equivalent `viaIR: true` (standard JSON) while enabling the optimizer. Otherwise, try removing local variables.
[solidity::util::tag_comment*] = Variable var__38 is 11 slot(s) too deep inside the stack. Stack too deep. Try compiling with `--via-ir` (cli) or the equivalent `viaIR: true` (standard JSON) while enabling the optimizer. Otherwise, try removing local variables.
The text was updated successfully, but these errors were encountered:
Environment
Steps to Reproduce
The text was updated successfully, but these errors were encountered: