Source file test/fixedbugs/issue33438.go
1 // compile 2 3 // Copyright 2019 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 hasPtrs struct { 10 x [2]*int 11 // Note: array size needs to be >1 to force this type to be not SSAable. 12 // The bug triggers only for OpMove, which is only used for unSSAable types. 13 } 14 15 func main() { 16 var x *hasPtrs // Can be local, global, or arg; nil or non-nil. 17 var y *hasPtrs = nil // Must initialize to nil. 18 *x = *y 19 } 20