tccgen.c: Make sure that gen_op always returns an rvalue.

Either this fix, or an alternative one, is required for arm64.
master
Edmund Grimley Evans 2015-02-20 22:18:41 +00:00
parent 6d055312a2
commit 40f7e11c53
1 changed files with 3 additions and 0 deletions

View File

@ -1832,6 +1832,9 @@ ST_FUNC void gen_op(int op)
vtop->type.t = t;
}
}
// Make sure that we have converted to an rvalue:
if (vtop->r & VT_LVAL)
gv(is_float(vtop->type.t & VT_BTYPE) ? RC_FLOAT : RC_INT);
}
#ifndef TCC_TARGET_ARM