Source file test/fixedbugs/issue20529.go
1 // errorcheck 2 3 //go:build amd64 4 5 // Copyright 2017 The Go Authors. All rights reserved. 6 // Use of this source code is governed by a BSD-style 7 // license that can be found in the LICENSE file. 8 9 // Issue 20529: Large stack frames caused compiler panics. 10 // Only tested on amd64 because the test only makes sense 11 // on a 64 bit system, and it is platform-agnostic, 12 // so testing one suffices. 13 14 package p 15 16 import "runtime" 17 18 func f() { // GC_ERROR "stack frame too large" 19 x := [][]int{1e9: []int{}} 20 runtime.KeepAlive(x) 21 } 22