From d00248980be23b5c889601cf749f5738a5dc8724 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Mon, 2 Nov 2009 10:50:18 -0800 Subject: [PATCH] do not emit USED for global x when compiling "_ = x;" R=ken@golang.org CC=r http://go/go-review/1018019 --- src/cmd/gc/gen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/gc/gen.c b/src/cmd/gc/gen.c index bb1b19bfc97..475058fa28e 100644 --- a/src/cmd/gc/gen.c +++ b/src/cmd/gc/gen.c @@ -427,7 +427,7 @@ cgen_discard(Node *nr) switch(nr->op) { case ONAME: - if(!(nr->class & PHEAP)) + if(!(nr->class & PHEAP) && nr->class != PEXTERN && nr->class != PFUNC) gused(nr); break;