Skip to content

cmd/compile: internal compiler error with 2 _ labels #70175

Closed

Description

@leabit

Go version

Go 1.23

Output of go env in your module/workspace:

/

What did you do?

Playground: https://go.dev/play/p/Qjo8Uh4a4eL

package main

func f() {
_:

_:
}

func main() {
	f()
}

What did you see happen?

./prog.go:10:3: internal compiler error: label ~_·1 missing tag

Please file a bug report including a short program that triggers the error.
https://go.dev/issue/new

What did you expect to see?

To work without errors.

Activity

  1. gabyhelp commented on Nov 2, 2024

    @gabyhelp

    Related Issues and Documentation

    (Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

  2. changed the title [-]runtime: calling a function with double blank named labels gives error[/-] [+]cmd/compile: internal compiler error with 2 _ labels[/+] on Nov 2, 2024
  3. leabit commented on Nov 2, 2024

    @leabit
    Author

    Similar, but not the same as the #52278. It now works as expected in that case, but not in the one I provided.

  4. zigo101 commented on Nov 3, 2024

    @zigo101
    Contributor

    Since v1.18.

  5. cuonglm commented on Nov 3, 2024

    @cuonglm
    Member

    Similar, but not the same as the #52278. It now works as expected in that case, but not in the one I provided.

    The reason is that _ was mangled during inlining, causing the check for blank node failed.

    CL 624377 will fix this.

  6. gopherbot commented on Nov 3, 2024

    @gopherbot
    Contributor

    Change https://go.dev/cl/624377 mentions this issue: cmd/compile: fix inlining name mangling for blank label

  7. self-assigned this
    on Nov 3, 2024
  8. added
    NeedsFixThe path to resolution is known, but the work has not been done.
    on Nov 3, 2024
  9. added a commit that references this issue on Nov 4, 2024
    324f41b
  10. locked and limited conversation to collaborators on Nov 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.compiler/runtimeIssues related to the Go compiler and/or runtime.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions