From 468e59206ba8a42645becb61d08c6d1749b56ca4 Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Sat, 13 Feb 2021 00:24:29 +0100 Subject: [PATCH] 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. --- tccgen.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tccgen.c b/tccgen.c index 2519e62e..b7f9e139 100644 --- a/tccgen.c +++ b/tccgen.c @@ -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; } -- 2.11.4.GIT