diff --git a/libsolidity/codegen/ir/IRGenerator.cpp b/libsolidity/codegen/ir/IRGenerator.cpp index 2f817d5db..22670500c 100644 --- a/libsolidity/codegen/ir/IRGenerator.cpp +++ b/libsolidity/codegen/ir/IRGenerator.cpp @@ -323,7 +323,7 @@ string IRGenerator::generateModifier( t("functionName", functionName); vector retParamsIn; for (auto const& varDecl: _function.returnParameters()) - retParamsIn += IRVariable(*varDecl).stackSlots(); + retParamsIn += m_context.addLocalVariable(*varDecl).stackSlots(); vector params = retParamsIn; for (auto const& varDecl: _function.parameters()) params += m_context.addLocalVariable(*varDecl).stackSlots();