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
NeedsFix
Milestone

Comments

@Karitham
Copy link

@Karitham 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

@dmitshur dmitshur commented Feb 17, 2022

CC @mdempsky, @randall77.

@dmitshur dmitshur added the NeedsInvestigation label Feb 17, 2022
@dmitshur dmitshur added this to the Go1.18 milestone Feb 17, 2022
@mdempsky
Copy link
Member

@mdempsky mdempsky commented Feb 17, 2022

/cc @danscales

Seems related to early/late transform splits.

@mdempsky
Copy link
Member

@mdempsky mdempsky commented Feb 17, 2022

Simplified test case:

package main

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

@danscales
Copy link
Contributor

@danscales 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

@danscales danscales commented Feb 17, 2022

I have the rough fix for this one.

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

@gopherbot gopherbot commented Feb 18, 2022

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

@dmitshur dmitshur added NeedsFix and removed NeedsInvestigation labels Feb 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsFix
Projects
None yet
Development

No branches or pull requests

5 participants