Closed
Description
This program:
package main
import (
"reflect"
"unsafe"
)
func F[T any](v T) uintptr {
return unsafe.Alignof(func() T {
_ = reflect.DeepEqual(struct{ _ T }{}, nil)
return v
}())
}
func main() {
F(0)
}
crashes both the 1.18.3 and the tip compiler with this error:
$ go build crash.go
# command-line-arguments
.\crash.go:16:3: internal compiler error: assertion failed
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done