| Linux in-mum-web1499.main-hosting.eu 5.14.0-503.40.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Mon May 5 06:06:04 EDT 2025 x86_64 Path : /opt/golang/1.22.0/src/cmd/go/testdata/script/ |
| Current File : //opt/golang/1.22.0/src/cmd/go/testdata/script/build_gcflags_order.txt |
# Tests golang.org/issue/47682
# Flags specified with -gcflags should appear after other flags generated by cmd/go.
cd m
go build -n -gcflags=-lang=go1.17
stderr ' -lang=go1.16.* -lang=go1.17'
! go build -gcflags='-c 0'
stderr 'compile: -c must be at least 1, got 0'
-- m/go.mod --
module example.com
go 1.16
-- m/main.go --
package main
func main() {
var s = []int{1, 2, 3}
var pa = (*[2]int)(s[1:])
println(pa[1])
}