tccgen.c: Make sure that gen_op always returns an rvalue.
Either this fix, or an alternative one, is required for arm64.
This commit is contained in:
parent
6d055312a2
commit
40f7e11c53
1 changed files with 3 additions and 0 deletions
3
tccgen.c
3
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
|
||||
|
|
Loading…
Add table
Reference in a new issue