harec

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

commit de45920036f7ef0f6297bd30d123a83b0e5787f2
parent ce600c87450690c5fb1137375a07ba0f4eaa145e
Author: Drew DeVault <sir@cmpwn.com>
Date:   Fri, 12 Feb 2021 08:53:38 -0500

gen: fix gen_copy on null dest

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

diff --git a/src/gen.c b/src/gen.c @@ -187,6 +187,9 @@ gen_copy(struct gen_context *ctx, const struct qbe_value *dest, const struct qbe_value *src) { + if (!dest) { + return; + } assert(!dest->indirect && !src->indirect); pushc(ctx->current, "begin gen_copy for type %s (is_union? %d)", dest->type->name, dest->type->is_union);