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:
parent
102357f028
commit
d00248980b
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user