1// run 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// This test _may_ fail on arm, but requires the host to 8// trap unaligned loads. This is generally done with 9// 10// echo "4" > /proc/cpu/alignment 11 12package main 13 14type T struct { 15 U uint16 16 V T2 17} 18 19type T2 struct { 20 pad [4096]byte 21 A, B byte 22} 23 24var s, t = new(T), new(T) 25 26func main() { 27 var u, v *T2 = &s.V, &t.V 28 u.B = v.B 29} 30