1
0
mirror of https://github.com/golang/go synced 2024-11-25 02:17:57 -07:00

do not emit USED for global x when compiling "_ = x;"

R=ken@golang.org
CC=r
http://go/go-review/1018019
This commit is contained in:
Russ Cox 2009-11-02 10:50:18 -08:00
parent 102357f028
commit d00248980b

View File

@ -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;