commit 4a3346ffe53bb6a4110adef94f63b12a13db8ae1
Author:     Roberto E. Vargas Caballero <[email protected]>
AuthorDate: Fri Jun 17 14:51:29 2016 +0200
Commit:     Roberto E. Vargas Caballero <[email protected]>
CommitDate: Fri Jun 17 14:51:29 2016 +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.

diff --git a/cc2/arch/qbe/cgen.c b/cc2/arch/qbe/cgen.c
index 68e778b..77a4691 100644
--- 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:

Reply via email to