aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/testdata/script/build_gcflags_order.txt
blob: 0ffe1570f6c6e40c062f318f6cf046a568d0f032 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# 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'

-- 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])
}