From 63f0a22c5d1f2621793db40bf33ddeeb514f598c Mon Sep 17 00:00:00 2001 From: chriseth Date: Wed, 2 Mar 2022 13:49:40 +0100 Subject: [PATCH] Also save and restore the nesting depth. --- libyul/optimiser/UnusedStoreBase.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libyul/optimiser/UnusedStoreBase.cpp b/libyul/optimiser/UnusedStoreBase.cpp index 8e34d172f..de13a23cc 100644 --- a/libyul/optimiser/UnusedStoreBase.cpp +++ b/libyul/optimiser/UnusedStoreBase.cpp @@ -73,6 +73,7 @@ void UnusedStoreBase::operator()(FunctionDefinition const& _functionDefinition) { ScopedSaveAndRestore outerAssignments(m_stores, {}); ScopedSaveAndRestore forLoopInfo(m_forLoopInfo, {}); + ScopedSaveAndRestore forLoopNestingDepth(m_forLoopNestingDepth, 0); (*this)(_functionDefinition.body);