CL 394074 broke the noopt builder. Something about time.After's inlining
depends on the build flags to make.bash, not the build flags that run.go
passes.
Change-Id: Ib284c66ea2008a4d32829c055d57c54a34ec3fb4
Reviewed-on: https://go-review.googlesource.com/c/go/+/396037
Trust: Keith Randall <khr@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
import (
"runtime"
- "time"
"unsafe"
)
}
}
-func select2(x chan bool) { // ERROR "can inline select2" "x does not escape"
+func select2(x, y chan bool) { // ERROR "can inline select2" "x does not escape" "y does not escape"
loop: // test that labeled select can be inlined.
select {
case <-x:
break loop
- case <-time.After(time.Second): // ERROR "inlining call to time.After"
+ case <-y:
}
}
-func inlineSelect2(x, y chan bool) { // ERROR "x does not escape" "y does not escape"
+func inlineSelect2(x, y chan bool) { // ERROR "can inline inlineSelect2" ERROR "x does not escape" "y does not escape"
loop:
for i := 0; i < 5; i++ {
if i == 3 {
break loop
}
- select2(x) // ERROR "inlining call to select2" "inlining call to time.After"
+ select2(x, y) // ERROR "inlining call to select2"
}
}