harec

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

commit 0397b5f11741d0be92e5ba04c155c416b914ffd0
parent f89dd7c11cb28821d40d8081f0806b979b723d79
Author: Eyal Sawady <ecs@d2evs.net>
Date:   Fri, 13 Aug 2021 09:51:25 +0000

gen: fix slicing of aliases

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

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

diff --git a/src/gen.c b/src/gen.c @@ -981,7 +981,8 @@ static void gen_expr_cast_slice_at(struct gen_context *ctx, const struct expression *expr, struct gen_value out) { - const struct type *to = expr->result, *from = expr->cast.value->result; + const struct type *to = expr->result, + *from = type_dealias(expr->cast.value->result); assert(from->storage == STORAGE_ARRAY); assert(from->array.length != SIZE_UNDEFINED);