mirror of
https://github.com/golang/go
synced 2024-09-05 07:54:46 +00:00
gc: issue 1231
Fixes #1231. R=ken2 CC=golang-dev https://golang.org/cl/3627041
This commit is contained in:
parent
dc9a3b2791
commit
1b31c37428
|
@ -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()) {
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue