mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
[qfcc] Set op type when aliasing a value
This fixes the ICE when attempting to compile address-cast without optimization (just realized why, too: the assignment was optimized out of existence).
This commit is contained in:
parent
777ce56cf3
commit
e524db1fc1
1 changed files with 2 additions and 0 deletions
|
@ -890,6 +890,7 @@ expr_alias (sblock_t *sblock, expr_t *e, operand_t **op)
|
|||
type = e->e.expr.type;
|
||||
sblock = statement_subexpr (sblock, e->e.expr.e1, &aop);
|
||||
if (type_compatible (aop->type, type)) {
|
||||
//FIXME type_compatible??? shouldn't that be type_size ==?
|
||||
if (offset) {
|
||||
internal_error (e, "offset alias of same size type");
|
||||
}
|
||||
|
@ -924,6 +925,7 @@ expr_alias (sblock_t *sblock, expr_t *e, operand_t **op)
|
|||
*op = def_operand (alias_def (def, type, offset), 0);
|
||||
} else if (aop->op_type == op_value) {
|
||||
*op = value_operand (aop->o.value);
|
||||
(*op)->type = type;
|
||||
} else {
|
||||
internal_error (e, "invalid alias target: %s: %s",
|
||||
optype_str (aop->op_type), operand_string (aop));
|
||||
|
|
Loading…
Reference in a new issue