blob: 6332697bd23dc1fac6463fc5eeda4ba52de01903 [file] [log] [blame]
Rémy Oudompheng94acfde2012-10-07 00:29:55 +02001// compile
2
Emmanuel Odeke53fd5222016-04-10 14:32:26 -07003// Copyright 2012 The Go Authors. All rights reserved.
Rémy Oudompheng94acfde2012-10-07 00:29:55 +02004// 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
9package main
10
11import "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.
16const N = 1 << unsafe.Sizeof(uintptr(0))
17
18type T [N][10][10][10][10][3]byte
19
20func F(t *T) byte {
21 return t[0][0][0][0][0][0]
22}