1// compile 2 3//go:build !386 && !arm && !mips && !mipsle && !amd64p32 4 5// Copyright 2013 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// Issue 6036: 6g's backend generates OINDREG with 10// offsets larger than 32-bit. 11 12package main 13 14type T struct { 15 Large [1 << 31]byte 16 A int 17 B int 18} 19 20func F(t *T) { 21 t.B = t.A 22} 23 24type T2 [1<<31 + 2]byte 25 26func F2(t *T2) { 27 t[1<<31+1] = 42 28} 29 30type T3 [1<<15 + 1][1<<15 + 1]int 31 32func F3(t *T3) { 33 t[1<<15][1<<15] = 42 34} 35 36type S struct { 37 A int32 38 B int32 39} 40 41type T4 [1<<29 + 1]S 42 43func F4(t *T4) { 44 t[1<<29].B = 42 45} 46