commit 3b0f89da407fabb8a2e08edb8c2c1a1e648b50a2
parent 9969748c9bfc89556171165889b77f6e79f19187
Author: Drew DeVault <sir@cmpwn.com>
Date: Tue, 10 Aug 2021 09:47:49 +0200
gen: fix struct auto-fill ABI
Signed-off-by: Drew DeVault <sir@cmpwn.com>
Diffstat:
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/gen.c b/src/gen.c
@@ -1719,6 +1719,7 @@ gen_expr_struct_at(struct gen_context *ctx,
struct qbe_value rtfunc = mkrtfunc(ctx, "rt.memset");
struct qbe_value size =
constl(expr->result->size), zero = constl(0);
+ struct qbe_value base = mklval(ctx, &out);
pushi(ctx->current, NULL, Q_CALL, &rtfunc,
&base, &zero, &size, NULL);
}
diff --git a/tests/configure b/tests/configure
@@ -45,6 +45,7 @@ EOF
03-pointers \
04-strings \
05-implicit-casts \
+ 06-structs \
07-aliases \
10-binarithms \
14-switch \
@@ -56,7 +57,6 @@ EOF
29-unarithm
# Disabled tests
- #06-structs \
#08-slices \
#09-funcs \
#11-globals \