modernc.org/gc@v1.0.1-0.20240304020402-f0dba7c97c2b/testdata/errchk/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 }