1// errorcheck -0 -m -l -smallframes 2 3// Copyright 2019 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 7// This checks that the -smallframes flag forces a large variable to heap. 8 9package main 10 11const ( 12 bufferLen = 200000 13) 14 15type kbyte []byte 16type circularBuffer [bufferLen]kbyte 17 18var sink byte 19 20func main() { 21 var c circularBuffer // ERROR "moved to heap: c$" 22 sink = c[0][0] 23} 24