]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix ICE in reporting of invalid recursive types
authorMatthew Dempsky <mdempsky@google.com>
Mon, 19 Oct 2020 21:14:40 +0000 (14:14 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Mon, 19 Oct 2020 21:30:43 +0000 (21:30 +0000)
commitc216ae80c965acb9641d94d5f58c206bd0cf7d66
treeb2c07946fb284f176dc5c6c8c24a65bb517df44a
parent5647d01ab724a19793ac7002776b0dec03fa35f5
cmd/compile: fix ICE in reporting of invalid recursive types

asNode(t.Nod).Name.Param will be nil for builtin types (i.e., the
universal predeclared types and unsafe.Pointer). These types can't be
part of a cycle anyway, so we can just skip them.

Fixes #42075.

Change-Id: Ic7a44de65c6bfd16936545dee25e36de8850acf3
Reviewed-on: https://go-review.googlesource.com/c/go/+/263717
Trust: Matthew Dempsky <mdempsky@google.com>
Trust: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
src/cmd/compile/internal/gc/align.go
test/fixedbugs/issue42075.go [new file with mode: 0644]