scc

Simple C99 Compiler
Log | Files | Refs | README | LICENSE

commit 4a3346ffe53bb6a4110adef94f63b12a13db8ae1
parent 3182c9c3bcfd64f88e0dbd3cd8a6cef26a49b237
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Fri, 17 Jun 2016 14:51:29 +0200

[cc2-qbe] Fix * operator

We only have to force a load, and the correct node
is not the current node, but the left child.

Diffstat:
cc2/arch/qbe/cgen.c | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/cc2/arch/qbe/cgen.c b/cc2/arch/qbe/cgen.c @@ -458,9 +458,8 @@ cgen(Node *np) return np; case OPTR: load(np, LOADL); - /* FIXME: The type of the loaded value is not np->type */ load(np, LOADL|FORCE); - return tmpnode(np); + return np->left; case OCPL: case ONEG: case OINC: