harec

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

commit eb270466e880a10c341c3b0e8984bdd28465eea1
parent cc8a3824e81f6769bb445b2773b7b03020bfb772
Author: Drew DeVault <sir@cmpwn.com>
Date:   Fri,  2 Jul 2021 14:44:40 -0400

gen: assert types match for gen_copy

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 @@ -146,6 +146,7 @@ gen_copy(struct gen_context *ctx, const struct gen_temp *src) { const struct type *dtype = type_dealias(dest->type); + assert(dtype == type_dealias(src->type)); switch (dtype->storage) { case STORAGE_BOOL: case STORAGE_CHAR: