Source file test/fixedbugs/issue77815.go
1 // compile 2 3 // Copyright 2026 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 package p 8 9 type S struct { 10 a [4]struct{} 11 f chan int 12 } 13 14 func f(p *S) { 15 var s S 16 17 // Memory write that requires a write barrier should work 18 // with structs having zero-sized arrays of non-zero elements. 19 *p = s 20 } 21