mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-20 18:52:28 +00:00
[qfcc] Use an alias op for return_operand
This is what using new_ret_expr would result in, but new_ret_expr is no longer used for referencing .return (except in pascal, but I haven't gotten around to sorting that out) due to the recent changes for Ruamoko progs. Fixes an ICE when compiling (with optimization) something like the following (dir is a vector): dir /= sqrt (dir * dir); return dir * speed;
This commit is contained in:
parent
82166406df
commit
f57aa82c4b
1 changed files with 5 additions and 1 deletions
|
@ -452,7 +452,11 @@ return_operand (type_t *type, expr_t *expr)
|
|||
symbol_t *return_symbol;
|
||||
return_symbol = make_symbol (".return", &type_param, pr.symtab->space,
|
||||
sc_extern);
|
||||
return def_operand (return_symbol->s.def, type, expr);
|
||||
if (!return_symbol->table) {
|
||||
symtab_addsymbol (pr.symtab, return_symbol);
|
||||
}
|
||||
def_t *return_def = return_symbol->s.def;
|
||||
return def_operand (alias_def (return_def, type, 0), 0, expr);
|
||||
}
|
||||
|
||||
operand_t *
|
||||
|
|
Loading…
Reference in a new issue