Files
golang.go/test/fixedbugs/issue77635.go
khr@golang.org 0886e65b11 cmd/compile: treat all zero-sized values as SSA-able
Might as well, we don't need any registers for such values.

Fixes #77635

Change-Id: Iedc1bc3f13662b043b183228bcc1dc4e6c91da81
Reviewed-on: https://go-review.googlesource.com/c/go/+/747780
Reviewed-by: Junyang Shao <shaojunyang@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
2026-02-25 16:52:27 -08:00

24 lines
441 B
Go

// compile
// Copyright 2026 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Issue 77635: test building values of zero-sized types.
package main
import "reflect"
func F[T interface{ [2][0]int }](x T) bool {
return reflect.DeepEqual(struct {
t T
c chan int
}{t: x}, 1)
}
func main() {
var t [2][0]int
F(t)
}