[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.
This commit is contained in:
Bill Currie 2022-02-03 14:15:20 +09:00
parent 6f49b919ec
commit 80c6431544

View file

@ -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;