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: b3.Succs has duplicate block b3 #11593

Closed
dvyukov opened this issue Jul 4, 2015 · 7 comments
Closed

cmd/compile: internal compiler error: b3.Succs has duplicate block b3 #11593

dvyukov opened this issue Jul 4, 2015 · 7 comments
Milestone

Comments

@dvyukov
Copy link
Member

dvyukov commented Jul 4, 2015

on dev.ssa branch
go version devel +be2a3e2 Thu Jul 2 08:29:33 2015 +0000 linux/amd64

gc crashes on the following program:

package a
func f_ssa() {_:{_:_:}}
go.go:2: internal compiler error: b3.Succs has duplicate block b3
@dvyukov
Copy link
Member Author

dvyukov commented Jul 4, 2015

@josharian @DanielMorsing

@DanielMorsing
Copy link
Contributor

Are labels named _ valid go? It would seem like you can't use them ever, yet an unused label is invalid.

@dvyukov
Copy link
Member Author

dvyukov commented Jul 4, 2015

@griesemer for spec question

@dvyukov
Copy link
Member Author

dvyukov commented Jul 4, 2015

Worth checking whether it crashes the same way with named labels.

@griesemer
Copy link
Contributor

@DanielMorsing @dvyukov Labels named _ are valid. The _ identifier is a valid identifier everywhere a name is declared (as in a label declaration), but _ is never entered into a scope and thus is never defined/declared. Thus it doesn't "exist" and cannot be used or found as being unused. Very much like _ variables are valid and the compiler does not complain if they are not used.

@ianlancetaylor ianlancetaylor added this to the Go1.6 milestone Jul 11, 2015
@gopherbot
Copy link
Contributor

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

gopherbot pushed a commit that referenced this issue Jul 12, 2015
An empty label statement can just be ignored, as it cannot
be the target of any gotos.

Tests are already in test/fixedbugs/issue7538*.go

Fixes #11589
Fixes #11593

Change-Id: Iadcd639e7200ce16aa40fd7fa3eaf82522513e82
Reviewed-on: https://go-review.googlesource.com/12093
Reviewed-by: Daniel Morsing <daniel.morsing@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
@josharian
Copy link
Contributor

Fixed by CL 12093.

@mikioh mikioh modified the milestones: Go1.5, Go1.6 Jul 23, 2015
@golang golang locked and limited conversation to collaborators Aug 5, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants