commit 2420038d66db4e3ae2ad55e8579052b31bf27c1a
parent 787032afc99de9f9e3c59b54ff3db6b2b0f652da
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Wed, 17 Nov 2021 14:10:55 +0100
cc1: Add size for scalar ops in emitdesig()
When a scalar expression is emitted the size of that expression
was not added to the current address.
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/src/cmd/cc/cc1/code.c b/src/cmd/cc/cc1/code.c
@@ -415,6 +415,7 @@ emitdesig(Node *np, Type *tp, SIZET *addr)
emit_expression:
emitexp(OEXPR, np);
+ *addr += tp->size;
}
static void