harec

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

commit b703b59d5daa4d6d29059a9deca64341231aaa42
parent 1d0a77647a7a165215ee915e0857efa4d620f574
Author: Drew DeVault <sir@cmpwn.com>
Date:   Fri, 13 Aug 2021 13:53:17 +0200

gen: fix missing side-effects on some casts

Signed-off-by: Drew DeVault <sir@cmpwn.com>

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

diff --git a/src/gen.c b/src/gen.c @@ -1076,6 +1076,7 @@ gen_expr_cast_tagged_at(struct gen_context *ctx, enum qbe_instr store = store_for_type(ctx, &builtin_type_uint); pushi(ctx->current, NULL, store, &id, &qout, NULL); if (subtype->size == 0) { + gen_expr(ctx, expr->cast.value); // side-effects return; }