Commit d0024898 authored by Russ Cox's avatar Russ Cox

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

R=ken@golang.org
CC=r
http://go/go-review/1018019
parent 102357f0
...@@ -427,7 +427,7 @@ cgen_discard(Node *nr) ...@@ -427,7 +427,7 @@ cgen_discard(Node *nr)
switch(nr->op) { switch(nr->op) {
case ONAME: case ONAME:
if(!(nr->class & PHEAP)) if(!(nr->class & PHEAP) && nr->class != PEXTERN && nr->class != PFUNC)
gused(nr); gused(nr);
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment