Update to go1.24.0
This commit is contained in:
20
test/live.go
20
test/live.go
@@ -458,14 +458,14 @@ func f28(b bool) {
|
||||
|
||||
func f29(b bool) {
|
||||
if b {
|
||||
for k := range m { // ERROR "live at call to mapiterinit: .autotmp_[0-9]+$" "live at call to mapiternext: .autotmp_[0-9]+$" "stack object .autotmp_[0-9]+ runtime.hiter$"
|
||||
for k := range m { // ERROR "live at call to (mapiterinit|mapIterStart): .autotmp_[0-9]+$" "live at call to (mapiternext|mapIterNext): .autotmp_[0-9]+$" "stack object .autotmp_[0-9]+ (runtime.hiter|internal/runtime/maps.Iter)$"
|
||||
printstring(k) // ERROR "live at call to printstring: .autotmp_[0-9]+$"
|
||||
}
|
||||
}
|
||||
for k := range m { // ERROR "live at call to mapiterinit: .autotmp_[0-9]+$" "live at call to mapiternext: .autotmp_[0-9]+$"
|
||||
for k := range m { // ERROR "live at call to (mapiterinit|mapIterStart): .autotmp_[0-9]+$" "live at call to (mapiternext|mapIterNext): .autotmp_[0-9]+$"
|
||||
printstring(k) // ERROR "live at call to printstring: .autotmp_[0-9]+$"
|
||||
}
|
||||
for k := range m { // ERROR "live at call to mapiterinit: .autotmp_[0-9]+$" "live at call to mapiternext: .autotmp_[0-9]+$"
|
||||
for k := range m { // ERROR "live at call to (mapiterinit|mapIterStart): .autotmp_[0-9]+$" "live at call to (mapiternext|mapIterNext): .autotmp_[0-9]+$"
|
||||
printstring(k) // ERROR "live at call to printstring: .autotmp_[0-9]+$"
|
||||
}
|
||||
}
|
||||
@@ -659,15 +659,9 @@ func newT40() *T40 {
|
||||
return &ret
|
||||
}
|
||||
|
||||
func bad40() {
|
||||
t := newT40()
|
||||
_ = t
|
||||
printnl()
|
||||
}
|
||||
|
||||
func good40() {
|
||||
ret := T40{} // ERROR "stack object ret T40$"
|
||||
ret.m = make(map[int]int) // ERROR "live at call to rand32: .autotmp_[0-9]+$" "stack object .autotmp_[0-9]+ runtime.hmap$"
|
||||
ret.m = make(map[int]int) // ERROR "live at call to rand(32)?: .autotmp_[0-9]+$" "stack object .autotmp_[0-9]+ (runtime.hmap|internal/runtime/maps.Map)$"
|
||||
t := &ret
|
||||
printnl() // ERROR "live at call to printnl: ret$"
|
||||
// Note: ret is live at the printnl because the compiler moves &ret
|
||||
@@ -675,6 +669,12 @@ func good40() {
|
||||
useT40(t)
|
||||
}
|
||||
|
||||
func bad40() {
|
||||
t := newT40()
|
||||
_ = t
|
||||
printnl()
|
||||
}
|
||||
|
||||
func ddd1(x, y *int) { // ERROR "live at entry to ddd1: x y$"
|
||||
ddd2(x, y) // ERROR "stack object .autotmp_[0-9]+ \[2\]\*int$"
|
||||
printnl()
|
||||
|
||||
Reference in New Issue
Block a user