wrong place to decrement uses. now have a problem in switch :/

This commit is contained in:
Bill Currie 2003-09-02 06:23:57 +00:00
parent e0866a5e41
commit 3a6c8b8b16

View file

@ -107,6 +107,7 @@ add_statement_ref (def_t *def, dstatement_t *st, int field)
if (def->alias) {
def = def->alias;
def->users--;
def->used = 1;
reloc_op_def_ofs (def, st_ofs, field);
} else
@ -557,7 +558,7 @@ emit_sub_expr (expr_t *e, def_t *dest)
tmp = new_def (e->e.expr.type, 0, def_a->scope);
tmp->ofs = 0;
tmp->alias = def_a;
tmp->users = def_a->users--;
tmp->users = def_a->users;
tmp->freed = 1;
return tmp;
}