Repository navigation
Closed
Labels
FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Description
What version of Go are you using (go version)?
$ go version go version go1.18 linux/amd64
Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (go env)?
go env Output
$ go env GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/home/bw/.cache/go-build" GOENV="/home/bw/.config/go/env" GOEXE="" GOEXPERIMENT="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOINSECURE="" GOMODCACHE="/home/bw/go/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/home/bw/go" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/usr/local/go" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64" GOVCS="" GOVERSION="go1.18" GCCGO="gccgo" GOAMD64="v1" AR="ar" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="/home/bw/src/bergamot/go.mod" GOWORK="" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build1251825903=/tmp/go-build -gno-record-gcc-switches"
What did you do?
go build ./... in https://github.com/bradenaw/bergamot a2e31c7e340800f186e9d382644399305f90e5b2
What did you expect to see?
Build succeeds, like with 1.18rc1:
11:00:17 bw@Falcon ~/src/bergamot main
~> /home/bw/src/goroot/bin/go version
go version go1.18rc1 linux/amd64
11:00:26 bw@Falcon ~/src/bergamot main
~> /home/bw/src/goroot/bin/go build ./...
11:00:30 bw@Falcon ~/src/bergamot main
~>
What did you see instead?
~> go build ./...
# github.com/bradenaw/bergamot
<autogenerated>:1: internal compiler error: assigning node (type *xlist.Node["".kvPair[uint8,"".vAndRef[int]]]) to parameter xlist.node (type *xlist.Node[go.shape.struct { "".k uint8; "".v struct { "".v int; "".ref uint32 } }_0])
Please file a bug report including a short program that triggers the error.
https://go.dev/issue/new
The project is about 1000 lines of code. I can work on a smaller reproduction if that's helpful. Unfortunately the compiler error is not particularly insightful, since it's marked <autogenerated>:1. The right type definition looks to my untrained eyes like the expansion of the left.
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Type
Projects
- StatusShow more project fieldsDone
Activity
bradenaw commentedon Mar 20, 2022
git bisectsuggestsce427cf96128b545ae473983bafb6a0b80ecaa08. Build succeeds with parent79cf7c839bffa7d6c8a24620ae4670b7e08bf732.ianlancetaylor commentedon Mar 20, 2022
CC @cherrymui in case this is really due to https://go.dev/cl/388995.
CC @randall77 because the error message suggests a confusion between shape types and non-shape types.
cuonglm commentedon Mar 21, 2022
git bisectpoints to eb8198d, which is https://go.dev/cl/387674.cc @danscales
[-]Build fails with 1.18 that succeeds with 1.18rc1[/-][+]cmd/compile: ICE with 1.18 program that succeeds with 1.18rc1[/+]bradenaw commentedon Mar 24, 2022
Removing this line causes the build to succeed:
https://github.com/bradenaw/bergamot/blob/a2e31c7e340800f186e9d382644399305f90e5b2/car.go#L67
bradenaw commentedon Mar 24, 2022
Copying the
xlistdependency into the package and using it locally also fixes the build, so it appears to require crossing a package boundary.Here's a local-minimum reproduction:
bradenaw commentedon Jun 20, 2022
This project builds successfully with go1.19beta1.