summaryrefslogtreecommitdiff
path: root/utils/kc/cgen.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils/kc/cgen.c')
-rw-r--r--utils/kc/cgen.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/utils/kc/cgen.c b/utils/kc/cgen.c
index e4e54d48..a6b5771c 100644
--- a/utils/kc/cgen.c
+++ b/utils/kc/cgen.c
@@ -493,6 +493,8 @@ cgen(Node *n, Node *nn)
} else
gopcode(OADD, nodconst(v), Z, &nod);
gopcode(OAS, &nod, Z, &nod2);
+ if(nn && l->op == ONAME) /* in x=++i, emit USED(i) */
+ gins(ANOP, l, Z);
regfree(&nod);
if(l->addable < INDEXED)