diff --git a/tools/qfcc/source/pr_imm.c b/tools/qfcc/source/pr_imm.c index d7bf39dd4..9b9df7c7d 100644 --- a/tools/qfcc/source/pr_imm.c +++ b/tools/qfcc/source/pr_imm.c @@ -183,6 +183,12 @@ PR_ReuseConstant (expr_t *expr, def_t *def) def->ofs = cn->ofs; def->initialized = def->constant = 1; cn = def; + } else { + if (cn->type != type) { + def = PR_NewDef (type, ".imm", 0); + def->ofs = cn->ofs; + cn = def; + } } return cn; }