Skip to content
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 on illegal assignement #51236

Closed
Karitham opened this issue Feb 17, 2022 · 6 comments
Closed

cmd/compile: internal compiler error on illegal assignement #51236

Karitham opened this issue Feb 17, 2022 · 6 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@Karitham
Copy link

Karitham commented Feb 17, 2022

What version of Go are you using (go version)?

devel (right now, go version devel go1.18-2c4c1ad Wed Feb 16 20:29:09 2022 -0800 linux/amd64)

Does this issue reproduce with the latest release?

yes

What did you do?

Improved example code by @madxmike

https://go.dev/play/p/bziYa_LWmkO?v=gotip

What did you expect to see?

Illegal assignment error

What did you see instead?

Compiler error

@Karitham Karitham changed the title go/compile: go/compile: internal compiler error on illegal assignement Feb 17, 2022
@seankhliao seankhliao changed the title go/compile: internal compiler error on illegal assignement cmd/compile: internal compiler error on illegal assignement Feb 17, 2022
@dmitshur
Copy link
Contributor

CC @mdempsky, @randall77.

@dmitshur dmitshur added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Feb 17, 2022
@dmitshur dmitshur added this to the Go1.18 milestone Feb 17, 2022
@mdempsky
Copy link
Member

/cc @danscales

Seems related to early/late transform splits.

@mdempsky
Copy link
Member

Simplified test case:

package main

func f([]byte)     {}
func g[T []byte]() { f(T(nil)) }
func main()        { g[[]byte]() }

@danscales
Copy link
Contributor

danscales commented Feb 17, 2022

This issue is the same as the second test case in #51232 , so let's make this the main issue for this case. I'll make a note in #51232 .

@danscales
Copy link
Contributor

I have the rough fix for this one.

@danscales danscales self-assigned this Feb 17, 2022
@gopherbot
Copy link

Change https://go.dev/cl/386220 mentions this issue: cmd/compile: delay all call transforms if in a generic function

@dmitshur dmitshur added NeedsFix The path to resolution is known, but the work has not been done. and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Feb 24, 2022
@golang golang locked and limited conversation to collaborators Jun 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

5 participants