]> Cypherpunks repositories - gostls13.git/commitdiff
6g bug: was dropping assignment of nil to globals
authorRuss Cox <rsc@golang.org>
Wed, 6 May 2009 00:33:51 +0000 (17:33 -0700)
committerRuss Cox <rsc@golang.org>
Wed, 6 May 2009 00:33:51 +0000 (17:33 -0700)
R=ken
OCL=28314
CL=28314

src/cmd/gc/gen.c

index 249d0fde05b4d6afd15b8bc817372f9813a7ee6e..1302ae10c6228dc211ee9d93acd7b92e05044bc0 100644 (file)
@@ -439,10 +439,13 @@ cgen_as(Node *nl, Node *nr)
                }
 
                // externals and heaps should already be clear
-               if(nl->class == PEXTERN)
-                       return;
-               if(nl->class & PHEAP)
-                       return;
+               if(nr == N) {
+                       if(nl->class == PEXTERN)
+                               return;
+                       if(nl->class & PHEAP)
+                               return;
+               }
+
                tl = nl->type;
                if(tl == T)
                        return;