Source file test/fixedbugs/issue77604.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  // Issue 77604: compiler crash when source and destination
     8  // of copy are the same address.
     9  
    10  package p
    11  
    12  type T struct {
    13  	a [192]byte
    14  }
    15  
    16  func f(x *T) {
    17  	i := any(x)
    18  	y := i.(*T)
    19  	*y = *x
    20  }
    21  

View as plain text