]> Cypherpunks repositories - gostls13.git/commitdiff
fix handling of *f() = 1
authorRuss Cox <rsc@golang.org>
Wed, 22 Oct 2008 20:13:01 +0000 (13:13 -0700)
committerRuss Cox <rsc@golang.org>
Wed, 22 Oct 2008 20:13:01 +0000 (13:13 -0700)
R=ken
OCL=17625
CL=17641

src/cmd/gc/walk.c

index 6c991c6a6acad33ff1795746e6e334a802064b0c..25f5d79d004c86cc202f0b1667f98833e1f7c4a9 100644 (file)
@@ -937,6 +937,8 @@ loop:
        case OIND:
                if(top == Etop)
                        goto nottop;
+               if(top == Elv)  // even if n is lvalue, n->left is rvalue
+                       top = Erv;
                walktype(n->left, top);
                if(n->left == N)
                        goto ret;