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: missed typecheck #61908

Closed
ALTree opened this issue Aug 9, 2023 · 3 comments
Closed

cmd/compile: internal compiler error: missed typecheck #61908

ALTree opened this issue Aug 9, 2023 · 3 comments
Assignees
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

Comments

@ALTree
Copy link
Member

ALTree commented Aug 9, 2023

$ go version
go version go1.21.0 linux/amd64

$ gotip version
go version devel go1.22-a3ced4a Wed Aug 9 03:13:11 2023 +0000 linux/amd64
package p

func f(p []byte) int {
	switch "" < string(p) {
	case true:
		return 0
	default:
		return 1
	}
}
$ go build crash.go 

# command-line-arguments
./crash.go:4:12: internal compiler error: missed typecheck: 
.   LEN int # crash.go:4:12
.   .   NAME-p.p esc(no) Class:PPARAM Offset:0 OnStack Used SLICE-[]byte tc(1) # crash.go:3:8

cc @golang/compiler @cuonglm

@ALTree ALTree added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Aug 9, 2023
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Aug 9, 2023
@cuonglm cuonglm self-assigned this Aug 9, 2023
@cuonglm cuonglm 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 Aug 9, 2023
@gopherbot
Copy link

Change https://go.dev/cl/517936 mentions this issue: cmd/compile: make backingArrayPtrLen to return typecheck-ed nodes

@cuonglm
Copy link
Member

cuonglm commented Aug 9, 2023

@gopherbot Please backport this to go1.21

@gopherbot
Copy link

Backport issue(s) opened: #61909 (for 1.21).

Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases.

@mknyszek mknyszek added this to the Go1.22 milestone Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
Status: All-But-Submitted
Development

No branches or pull requests

4 participants