From f9c435c0c2f58c87699e1ef693388bc4df180ba0 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Tue, 4 Apr 2006 17:17:30 +0100 Subject: [PATCH] mpreduce: Debug decomposition corrupts initial state for code generator. The code generation pass uses whatever final state the debugging run left behind. Have the debug pass force the final state back to Z when it finishes. Also, produce correct output from the debugging pass. --- mpreduce.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mpreduce.c b/mpreduce.c index 0f20ed8..52e86a1 100644 --- a/mpreduce.c +++ b/mpreduce.c @@ -101,7 +101,8 @@ int mpreduce_create(mpreduce *r, mp *p) case X0 | 0: st = Z; printf("+ %lu\n", i - 1); break; } } - if (st >= X) printf("+ %lu\n", i); + if (st >= X) printf("+ %lu\n", i - 1); + st = Z; #endif for (i = 0, mp_scan(&sc, p); i < d - 1 && mp_step(&sc); i++) { -- 2.11.0