diff --git a/tools/transform.cpp b/tools/transform.cpp index 42f38a915..a76fd2991 100644 --- a/tools/transform.cpp +++ b/tools/transform.cpp @@ -667,8 +667,9 @@ check_refinement(Errors &errs, const Transform &t, State &src_state, // 6. Check memory auto &src_mem = src_state.returnMemory(); auto &tgt_mem = tgt_state.returnMemory(); - auto [memory_cnstr, ptr_refinement, mem_undef] + auto [memory_cnstr0, ptr_refinement0, mem_undef] = src_mem.refined(tgt_mem, false); + auto &ptr_refinement = ptr_refinement0; qvars.insert(mem_undef.begin(), mem_undef.end()); auto print_ptr_load = [&](ostream &s, const Model &m) { @@ -679,8 +680,8 @@ check_refinement(Errors &errs, const Transform &t, State &src_state, << "\nTarget value: " << Byte(tgt_mem, m[tgt_mem.raw_load(p, undef)()]); }; - CHECK(dom && !(memory_cnstr.isTrue() ? memory_cnstr - : value_cnstr && memory_cnstr), + CHECK(dom && !(memory_cnstr0.isTrue() ? memory_cnstr0 + : value_cnstr && memory_cnstr0), print_ptr_load, "Mismatch in memory"); #undef CHECK