blob: 66b9538e03ae2d74446795c8ba86c1b4faef7e1f [file] [log] [blame]
Keith Randalle130dcf2017-10-10 17:43:41 -07001// errorcheck
2
3// Copyright 2017 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.
6
7package p
8
9func f1(x *[1<<30 - 1e6]byte) byte {
10 for _, b := range *x {
11 return b
12 }
13 return 0
14}
15func f2(x *[1<<30 + 1e6]byte) byte { // ERROR "stack frame too large"
16 for _, b := range *x {
17 return b
18 }
19 return 0
20}