commit 9c363497114e0f7a050c5952fdadb1236e39ed8e
parent 010023adf639d11faa57093647590296fb8a6264
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