cmd/compile: internal compiler error: Value live at entry #58349
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
It does not occur on the latest major version (1.20.0), but it does occur on the latest minor versions of the last two major versions (1.19.5 and 1.18.10).
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I've reduced my code to this repro case. In summary, I have a function in main, that calls a function in another package, which then calls a generic function which returns a function object instanced to the passed type.
To reproduce, create 3 files:
go.mod
main.go
inner/inner.go
It's important that the first function in the call stack crosses a package boundary, moving
CallFuncWithInt
intomain
instead results in no internal compiler error (hence why I can't provide a go.dev/play link).What did you expect to see?
A successful compilation.
What did you see instead?
I've reproduced this error on 1.19.5 and 1.18.10, but it does not happen on 1.20.0.
All of these tests were done by mounting the code in a docker container:
docker run --platform linux/amd64 -it -w /app -v $PWD:/app golang:1.19.5 bash
followed by
go build
,go env
etc.The text was updated successfully, but these errors were encountered: