cmd/compile: internal compiler error on import on mismatch between -p and package name #54542
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
It's a small thing but I have encountered this by chance and I though I'd report it anyway, leaving for the compiler team to decide if it needs to be fixed.
Since
unified
was enabled by default, an internal compiler error can be triggered on manual invocations ofgo tool compile
when there's mismatch between the package name as imported by main and the-p
flag. Example:a.go
main.go
Now:
This doesn't happen with
GOEXPERIMENT=nounified
, and in fact a subsequentgo tool link
invocation appears to produce a working binary.unified
may want to either follow the old behaviour (no errors) or report an error message instead of an ICE.cc @mdempsky
The text was updated successfully, but these errors were encountered: