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: ICE after regular error on [...]byte("string") #16428

Closed
josharian opened this issue Jul 19, 2016 · 2 comments
Closed

cmd/compile: ICE after regular error on [...]byte("string") #16428

josharian opened this issue Jul 19, 2016 · 2 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@josharian
Copy link
Contributor

package p

var (
     b = [...]byte("abc")
     s = len(b)
 )

compiled yields:

bad.go:4: use of [...] array outside of array literal
bad.go:5: internal compiler error: NumElem array [...]byte does not have bound yet
// stack trace omitted

This is an easy fix -- just check nerrors before calling NumElem. This is a reminder issue to fix for 1.8.

@josharian josharian added this to the Go1.8 milestone Jul 19, 2016
@josharian josharian self-assigned this Jul 19, 2016
@rsc
Copy link
Contributor

rsc commented Oct 3, 2016

Isn't the "internal compiler error" supposed to be suppressed if there has already been some other error printed?

@quentinmit quentinmit added the NeedsFix The path to resolution is known, but the work has not been done. label Oct 11, 2016
@rsc rsc assigned mdempsky and unassigned josharian Oct 21, 2016
@gopherbot
Copy link

CL https://golang.org/cl/31731 mentions this issue.

@golang golang locked and limited conversation to collaborators Oct 21, 2017
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