-
Notifications
You must be signed in to change notification settings - Fork 17.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/compile: internal compiler error: 'main': Value live at entry. It shouldn't be #52590
Comments
Playground link: https://go.dev/play/p/V1I_NzFDws5 |
I think the issue is we're missing export/import for n.Init for OPRINTLN, and other builtins that allow multiple arguments. Good: go/src/cmd/compile/internal/typecheck/iexport.go Lines 2053 to 2063 in 89044b6
Bad: go/src/cmd/compile/internal/typecheck/iexport.go Lines 2036 to 2040 in 89044b6
Should be a straightforward fix (just matching changes to iexport.go and iimport.go, and a regress test case). I'll send a CL tomorrow, unless any contributors want to tackle it. |
Change https://go.dev/cl/402854 mentions this issue: |
FWIW, I think the fix is small and could be easily backported, but I don't think it's necessary here. It looks like the same issue existed back in Go 1.16, so it's not a recent regression. So there's probably no existing code running into this. There's also two easy workarounds: (1) rewrite the code to manually spill the multi-value results to temporary variables (e.g., rewrite If anyone else thinks it deserves a backport, I encourage opening a backport issue and we can discuss further there. Thanks. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
recurrent
then
but if modify bbb/bbb.go
then
# go run aaa/main.go 1 1 1
What did you expect to see?
why is the println() error
What did you see instead?
The text was updated successfully, but these errors were encountered: