blob: d80c7f2dcca92cd43eb05cebf3b7854b0324dd45 [file] [log] [blame]
[!gc] skip
# Set up fresh GOCACHE.
env GOCACHE=$WORK/gocache
mkdir $GOCACHE
# Building a trivial non-main package should run compiler the first time.
go build -x -gcflags=-m lib.go
stderr 'compile( |\.exe)'
stderr 'lib.go:2.* can inline f'
# ... but not the second, even though it still prints the compiler output.
go build -x -gcflags=-m lib.go
! stderr 'compile( |\.exe)'
stderr 'lib.go:2.* can inline f'
-- lib.go --
package p
func f(x *int) *int { return x }