harec

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 64ea362ccd1b716a2f77b723778bd2843a1cc4b5
parent a22f0c06a22868578215b1dc2897e297a5ee9121
Author: Eyal Sawady <ecs@d2evs.net>
Date:   Mon, 18 Oct 2021 12:54:00 +0000

gen: fix global slices containing aggregate types

Previously, we would ignore all but the first subitem of each member in
the STORAGE_SLICE case of gen_data_item

Signed-off-by: Eyal Sawady <ecs@d2evs.net>

Diffstat:
Msrc/gen.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gen.c b/src/gen.c @@ -3085,7 +3085,7 @@ gen_data_item(struct gen_context *ctx, struct expression *expr, struct qbe_data_item *subitem = &def->data.items; for (struct array_constant *c = constant->array; c; c = c->next) { - gen_data_item(ctx, c->value, subitem); + subitem = gen_data_item(ctx, c->value, subitem); if (c->next) { subitem->next = xcalloc(1, sizeof(struct qbe_data_item));