Handle aliased values when emitting statements

With this, cast address initializers work. I have to wonder if the alias
value short-circuit was legacy from long before the rewrite, as it was
quite trivial to handle in the back-end.
This commit is contained in:
Bill Currie 2020-02-15 15:38:15 +09:00
parent e4eb793fb3
commit 3e651b43f8

View file

@ -906,6 +906,8 @@ expr_alias (sblock_t *sblock, expr_t *e, operand_t **op)
while (def->alias)
def = def->alias;
*op = def_operand (alias_def (def, type, offset), 0);
} else if (aop->op_type == op_value) {
*op = value_operand (aop->o.value);
} else {
internal_error (e, "invalid alias target: %s: %s",
optype_str (aop->op_type), operand_string (aop));