]> Cypherpunks repositories - gostls13.git/commitdiff
bug 142
authorKen Thompson <ken@golang.org>
Fri, 10 Apr 2009 02:11:24 +0000 (19:11 -0700)
committerKen Thompson <ken@golang.org>
Fri, 10 Apr 2009 02:11:24 +0000 (19:11 -0700)
order of evaluation && and ||

R=r
OCL=27294
CL=27294

src/cmd/6g/cgen.c

index 29f10bc832753234992199029cca848a1dedf04c..85d86d5d632088c2dd81a38968e102439b314410 100644 (file)
@@ -104,10 +104,10 @@ cgen(Node *n, Node *res)
        nr = n->right;
        if(nl != N && nl->ullman >= UINF)
        if(nr != N && nr->ullman >= UINF) {
-               tempname(&n1, nr->type);
-               cgen(nr, &n1);
+               tempname(&n1, nl->type);
+               cgen(nl, &n1);
                n2 = *n;
-               n2.right = &n1;
+               n2.left = &n1;
                cgen(&n2, res);
                goto ret;
        }