Clear vtop.sym if saving on stack

normally the sym slot is meaningful only with VT_SYM.  But we also
use it when mentioning a decl for inline asms with register vars,
conditional on being a VT_LOCAL entry.  So when generating VT_LOCAL we
need to reset .sym as it might contain stale entries from the cmp_op
fields.
This commit is contained in:
Michael Matz 2021-02-13 00:24:29 +01:00
parent ce8814cdd6
commit 468e59206b

View File

@ -1918,6 +1918,7 @@ ST_FUNC void save_reg_upstack(int r, int n)
} else {
p->r = VT_LVAL | VT_LOCAL;
}
p->sym = NULL;
p->r2 = VT_CONST;
p->c.i = l;
}