From 40f7e11c5352a3e400d5315f8b2de1f33ca25c82 Mon Sep 17 00:00:00 2001 From: Edmund Grimley Evans Date: Fri, 20 Feb 2015 22:18:41 +0000 Subject: [PATCH] tccgen.c: Make sure that gen_op always returns an rvalue. Either this fix, or an alternative one, is required for arm64. --- tccgen.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tccgen.c b/tccgen.c index b96b2857..383b1466 100644 --- a/tccgen.c +++ b/tccgen.c @@ -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