From 3e9b171b79de56d8a7f7f1c02d83adeccbd3f0f5 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Tue, 5 May 2009 17:33:51 -0700 Subject: [PATCH] 6g bug: was dropping assignment of nil to globals R=ken OCL=28314 CL=28314 --- src/cmd/gc/gen.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/cmd/gc/gen.c b/src/cmd/gc/gen.c index 249d0fde05..1302ae10c6 100644 --- a/src/cmd/gc/gen.c +++ b/src/cmd/gc/gen.c @@ -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; -- 2.48.1