Source file test/fixedbugs/issue22200b.go

     1  // errorcheck
     2  
     3  //go:build !386 && !amd64p32 && !arm && !mips && !mipsle
     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  package p
    10  
    11  func f3(x *[1 << 31]byte) byte { // GC_ERROR "stack frame too large"
    12  	sum := byte(0)
    13  	for _, b := range *x {
    14  		sum += b
    15  	}
    16  	return sum
    17  }
    18  func f4(x *[1 << 32]byte) byte { // GC_ERROR "stack frame too large"
    19  	sum := byte(0)
    20  	for _, b := range *x {
    21  		sum += b
    22  	}
    23  	return sum
    24  }
    25  func f5(x *[1 << 33]byte) byte { // GC_ERROR "stack frame too large"
    26  	sum := byte(0)
    27  	for _, b := range *x {
    28  		sum += b
    29  	}
    30  	return sum
    31  }
    32  

View as plain text