]> Cypherpunks repositories - gostls13.git/commitdiff
initialization of
authorKen Thompson <ken@golang.org>
Wed, 1 Oct 2008 21:16:57 +0000 (14:16 -0700)
committerKen Thompson <ken@golang.org>
Wed, 1 Oct 2008 21:16:57 +0000 (14:16 -0700)
var a,b int;

R=r
OCL=16318
CL=16318

src/cmd/6g/gen.c

index 2ec661e45534fde43aa5010547fbb5176c2adbf8..1f053afc1916a310fb487aaf2f4638a70ff53b16 100644 (file)
@@ -896,11 +896,15 @@ cgen_as(Node *nl, Node *nr, int op)
        if(nl == N)
                return;
 
-       tl = nl->type;
-       if(tl == T)
-               return;
-
        if(nr == N || isnil(nr)) {
+               if(nl->op == OLIST) {
+                       cgen_as(nl->left, nr, op);
+                       cgen_as(nl->right, nr, op);
+                       return;
+               }
+               tl = nl->type;
+               if(tl == T)
+                       return;
                if(isfat(tl)) {
                        /* clear a fat object */
                        if(debug['g'])
@@ -978,6 +982,10 @@ cgen_as(Node *nl, Node *nr, int op)
                ullmancalc(nr);
        }
 
+       tl = nl->type;
+       if(tl == T)
+               return;
+
        cgen(nr, nl);
 
 ret: