Source file test/fixedbugs/issue80196.go
1 // run 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 main 8 9 type S [5]*byte 10 11 //go:noinline 12 func f() S { 13 return S{} 14 } 15 16 var sink *S 17 18 //go:noinline 19 func g() (s S) { 20 sink = &s 21 s = f() 22 return 23 } 24 25 func main() { 26 for i := range 1000000 { 27 s := g() 28 if s != (S{}) { 29 println(s[0], s[1], s[2], s[3], s[4]) 30 panic(i) 31 } 32 } 33 } 34