mirror of
https://github.com/golang/go
synced 2024-11-21 19:34:46 -07: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) {
|
switch(nr->op) {
|
||||||
case ONAME:
|
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);
|
gused(nr);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -98,4 +98,15 @@ func main() {
|
|||||||
println("newfunc returned broken funcs")
|
println("newfunc returned broken funcs")
|
||||||
panic("fail")
|
panic("fail")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ff(1)
|
||||||
|
}
|
||||||
|
|
||||||
|
func ff(x int) {
|
||||||
|
call(func() {
|
||||||
|
_ = x
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func call(func()) {
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user