diff --git a/src/compiler.cpp b/src/compiler.cpp index 7d9d3aad59..998c78c2f9 100644 --- a/src/compiler.cpp +++ b/src/compiler.cpp @@ -5063,10 +5063,15 @@ class MyCompiler: public Compiler { Local* local = e->localsBefore + i; if (local->value) { initLocal(1, i); + } + } + for (int i = 0; i < static_cast(c.localFootprint); ++i) { + Local* local = e->localsBefore + i; + if (local->value) { int highOffset = c.arch->bigEndian() ? 1 : -1; - if (i + highOffset > 0 + if (i + highOffset >= 0 and i + highOffset < static_cast(c.localFootprint) and local->value->high == local[highOffset].value) {