modernc.org/gc@v1.0.1-0.20240304020402-f0dba7c97c2b/testdata/errchk/test/fixedbugs/issue20529.go (about)

     1  // errorcheck
     2  
     3  // +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  func f() { // ERROR "stack frame too large"
    17  	_ = [][]int{1e9: []int{}}
    18  }