Commit 1b31c374 authored by Russ Cox's avatar Russ Cox

gc: issue 1231

Fixes #1231.

R=ken2
CC=golang-dev
https://golang.org/cl/3627041
parent dc9a3b27
......@@ -433,7 +433,7 @@ cgen_discard(Node *nr)
switch(nr->op) {
case ONAME:
if(!(nr->class & PHEAP) && nr->class != PEXTERN && nr->class != PFUNC)
if(!(nr->class & PHEAP) && nr->class != PEXTERN && nr->class != PFUNC && nr->class != PPARAMREF)
gused(nr);
break;
......
......@@ -98,4 +98,15 @@ func main() {
println("newfunc returned broken funcs")
panic("fail")
}
ff(1)
}
func ff(x int) {
call(func() {
_ = x
})
}
func call(func()) {
}
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