Skip to content

cmd/compile: internal compiler error: cannot represent parameters of type struct ... #77635

@ALTree

Description

@ALTree
$ gotip version
go version go1.27-devel_f65692ea56 Sun Feb 15 07:19:01 2026 -0800 linux/amd64
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)
}
$ gotip build crash.go
# command-line-arguments
./crash.go:5:6: internal compiler error: ./crash.go:5:6: internal compiler error: cannot represent parameters of type struct { t go.shape.[2][0]int; c chan int } in registers
cannot represent parameters of type struct { t go.shape.[2][0]int; c chan int } in registers
./crash.go:5:6: internal compiler error: cannot represent parameters of type struct { t go.shape.[2][0]int; c chan int } in registers
...

Crashes both tip and go1.26

Metadata

Metadata

Assignees

Labels

BugReportIssues describing a possible bug in the Go implementation.FixPendingIssues that have a fix which has not yet been reviewed or submitted.compiler/runtimeIssues related to the Go compiler and/or runtime.

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions