mirror of
https://github.com/golang/go
synced 2024-11-26 06:27:58 -07:00
[dev.typeparams] test: test regabidefers in live.go
Previously, live.go is conditioned on not using regabidefers. Now we have regabidefers enabled by default everywhere, and we may remove the fallback path in the near future, test that configuration instead. Change-Id: Idf910aee323bdd6478bc7a2062b2052d82ce003f Reviewed-on: https://go-review.googlesource.com/c/go/+/325111 Trust: Cherry Mui <cherryyz@google.com> Run-TryBot: Cherry Mui <cherryyz@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com>
This commit is contained in:
parent
3298c749ac
commit
4cf7f5f694
@ -1,5 +1,5 @@
|
|||||||
// errorcheckwithauto -0 -l -live -wb=0 -d=ssa/insert_resched_checks/off
|
// errorcheckwithauto -0 -l -live -wb=0 -d=ssa/insert_resched_checks/off
|
||||||
// +build !ppc64,!ppc64le,!goexperiment.regabi,!goexperiment.regabidefer
|
// +build !ppc64,!ppc64le,goexperiment.regabidefer,!goexperiment.regabiargs
|
||||||
|
|
||||||
// ppc64 needs a better tighten pass to make f18 pass
|
// ppc64 needs a better tighten pass to make f18 pass
|
||||||
// rescheduling checks need to be turned off because there are some live variables across the inserted check call
|
// rescheduling checks need to be turned off because there are some live variables across the inserted check call
|
||||||
@ -424,7 +424,7 @@ func f27defer(b bool) {
|
|||||||
}
|
}
|
||||||
defer call27(func() { x++ }) // ERROR "stack object .autotmp_[0-9]+ struct \{"
|
defer call27(func() { x++ }) // ERROR "stack object .autotmp_[0-9]+ struct \{"
|
||||||
printnl() // ERROR "live at call to printnl: .autotmp_[0-9]+ .autotmp_[0-9]+"
|
printnl() // ERROR "live at call to printnl: .autotmp_[0-9]+ .autotmp_[0-9]+"
|
||||||
return // ERROR "live at call to call27: .autotmp_[0-9]+"
|
return // ERROR "live at indirect call: .autotmp_[0-9]+"
|
||||||
}
|
}
|
||||||
|
|
||||||
// and newproc (go) escapes to the heap
|
// and newproc (go) escapes to the heap
|
||||||
@ -432,9 +432,9 @@ func f27defer(b bool) {
|
|||||||
func f27go(b bool) {
|
func f27go(b bool) {
|
||||||
x := 0
|
x := 0
|
||||||
if b {
|
if b {
|
||||||
go call27(func() { x++ }) // ERROR "live at call to newobject: &x$" "live at call to newproc: &x$"
|
go call27(func() { x++ }) // ERROR "live at call to newobject: &x$" "live at call to newobject: &x .autotmp_[0-9]+$" "live at call to newproc: &x$" // allocate two closures, the func literal, and the wrapper for go
|
||||||
}
|
}
|
||||||
go call27(func() { x++ }) // ERROR "live at call to newobject: &x$"
|
go call27(func() { x++ }) // ERROR "live at call to newobject: &x$" "live at call to newobject: .autotmp_[0-9]+$" // allocate two closures, the func literal, and the wrapper for go
|
||||||
printnl()
|
printnl()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user