github.com/xushiwei/go@v0.0.0-20130601165731-2b9d83f45bc9/test/fixedbugs/issue4396b.go (about) 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 12 package main 13 14 type T struct { 15 U uint16 16 V T2 17 } 18 19 type T2 struct { 20 pad [4096]byte 21 A, B byte 22 } 23 24 var s, t = new(T), new(T) 25 26 func main() { 27 var u, v *T2 = &s.V, &t.V 28 u.B = v.B 29 }