diff gen/CodeGen.d @ 113:244142a21cbc

Fix derefs as lvalues
author Anders Halager <halager@gmail.com>
date Sun, 25 May 2008 15:49:25 +0200
parents 189c049cbfcc
children e89c42733e10 0cd8d6ab3f89
line wrap: on
line diff
--- a/gen/CodeGen.d	Sun May 25 15:48:13 2008 +0200
+++ b/gen/CodeGen.d	Sun May 25 15:49:25 2008 +0200
@@ -629,10 +629,10 @@
                 // LValue(*x): x
                 // RValue(*x): load(x)
                 // This way *x = *x + 1 will work
-                // TODO: Get's an i32** rather than i32* because it's alloc'd
-                //        so there needs to be a load?
+                // We get an i32** rather than i32* because it's alloc'd
+                // so there needs to be a load
                 auto DE = cast(DerefExp)exp;
-                return genLValue(DE.exp);
+                return LValue(genExpression(DE.exp).value);
             case ExpType.Index:
                 auto indexExp = cast(IndexExp)exp;
                 auto type = indexExp.target.type;