harec

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

commit 8f3c59e735bdfdd60de0032dbbb938256ca90549
parent b61a252dc39f4accb22a2a1196c2b82b4863f964
Author: Bor Grošelj Simić <bor.groseljsimic@telemach.net>
Date:   Thu,  4 Mar 2021 23:01:03 +0100

gen: fix computation of expected struct field offset

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

diff --git a/src/gen.c b/src/gen.c @@ -2736,7 +2736,7 @@ gen_data_item(struct gen_context *ctx, struct expression *expr, if (f->next) { const struct struct_field *f1 = f->field; const struct struct_field *f2 = f->next->field; - if (f2->offset != f1->offset + f2->type->size) { + if (f2->offset != f1->offset + f1->type->size) { item->next = xcalloc(1, sizeof(struct qbe_data_item)); item = item->next;