From 80c643154475d78621a0f676fdeba81f46eb44cb Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Thu, 3 Feb 2022 14:15:20 +0900 Subject: [PATCH] [qfcc] Clear up a FIXME The FIXME was there because I couldn't remember why the test was type_compatible but the internal error complains about the types being the same size. The compatibility check is to see if the op can be used directly or whether a temp is required. The offset check is because types that are the same size (which they must be if they are compatible) is because it is not possible to create an offset alias def that escapes the bounds of the real def, which any non-zero offset will do if the types are the same size. --- tools/qfcc/source/statements.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/qfcc/source/statements.c b/tools/qfcc/source/statements.c index e75d4c676..7fed3cef0 100644 --- a/tools/qfcc/source/statements.c +++ b/tools/qfcc/source/statements.c @@ -1532,8 +1532,9 @@ expr_alias (sblock_t *sblock, expr_t *e, operand_t **op) type = e->e.alias.type; sblock = statement_subexpr (sblock, e->e.alias.expr, &aop); if (type_compatible (aop->type, type)) { - //FIXME type_compatible??? shouldn't that be type_size ==? if (offset) { + //For types to be compatible, they must be the same size, thus this + //seemingly mismatched error internal_error (e, "offset alias of same size type"); } *op = aop;