Skip to content

cmd/compile: panic: internal error: can't locate after prolog value (with -N -l) #45948

@ALTree

Description

@ALTree
$ gotip version
go version devel go1.17-da7496d841 Tue May 4 17:37:39 2021 +0000 linux/amd64
package p

func f(p int) {
L:
	goto L

}
$ gotip tool compile -N -l crash.go

panic: internal error: f=f: can't locate after prolog value

goroutine 7 [running]:
cmd/compile/internal/ssa.BuildFuncDebugNoOptimized(0xc000172400, 0xc00037cea0, 0x0, 0xd1e2b8)
	/home/alberto/go/src/cmd/compile/internal/ssa/debug.go:1366 +0xf54
cmd/compile/internal/ssagen.genssa(0xc00037cea0, 0xc000402a80)
	/home/alberto/go/src/cmd/compile/internal/ssagen/ssa.go:6988 +0xc16
cmd/compile/internal/ssagen.Compile(0xc0001382c0, 0x0)
	/home/alberto/go/src/cmd/compile/internal/ssagen/pgen.go:175 +0x266
cmd/compile/internal/gc.compileFunctions.func2.1()
	/home/alberto/go/src/cmd/compile/internal/gc/compile.go:136 +0x65
created by cmd/compile/internal/gc.compileFunctions.func2
	/home/alberto/go/src/cmd/compile/internal/gc/compile.go:134 +0xcf

Doesn't crash on Go1.16.
Doesn't crash on GOEXPERIMENT=noregabiargs.

Reduced from a gosmith crasher.

cc @cherrymui @aclements @dr2chase

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions