modernc.org/gc@v1.0.1-0.20240304020402-f0dba7c97c2b/testdata/errchk/test/fixedbugs/bug458.go (about) 1 // compile 2 3 // Copyright 2012 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 // Issue 4200: 6g crashes when a type is larger than 4GB. 8 9 package main 10 11 import "unsafe" 12 13 // N=16 on 32-bit arches, 256 on 64-bit arches. 14 // On 32-bit arches we don't want to test types 15 // that are over 4GB large. 16 const N = 1 << unsafe.Sizeof(uintptr(0)) 17 18 type T [N][10][10][10][10][3]byte 19 20 func F(t *T) byte { 21 return t[0][0][0][0][0][0] 22 }