3 // Copyright 2018 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
7 // We have a limit of 1GB for stack frames.
8 // Make sure we include the callee args section.
12 type Big = [400e6]byte
14 func f() { // GC_ERROR "stack frame too large"
15 // Note: This test relies on the fact that we currently always
16 // spill function-results to the stack, even if they're so
17 // large that we would normally heap allocate them. If we ever
18 // improve the backend to spill temporaries to the heap, this
19 // test will probably need updating to find some new way to
20 // construct an overly large stack frame.