Skip to content

cmd/compile: internal compiler error: 'f': value .autotmp_1 (nil) incorrectly live at entry #61778

Closed
@ALTree

Description

@ALTree
$ go version
go version go1.21rc4 linux/amd64

$ gotip version
go version devel go1.22-a09ea59 Wed Aug 2 15:25:43 2023 +0000 linux/amd64
package p

func f(s []byte) {
	switch "" {
	case string(append(s, 'a')):
	}
}
$ gotip build crash.go
# command-line-arguments
./crash.go:3:6: internal compiler error: 'f': value .autotmp_1 (nil) incorrectly live at entry

goroutine 9 [running]:
runtime/debug.Stack()
	./desktop/gotip/src/runtime/debug/stack.go:24 +0x5e
cmd/compile/internal/base.FatalfAt({0x137ee0?, 0xc0?}, {0xc00002c9c0, 0x2d}, {0xc00040f050, 0x3, 0x3})
	./desktop/gotip/src/cmd/compile/internal/base/print.go:230 +0x1d7
cmd/compile/internal/base.Fatalf(...)
	./desktop/gotip/src/cmd/compile/internal/base/print.go:199
cmd/compile/internal/ssagen.(*ssafn).Fatalf(0x20?, {0x7ca8b108?, 0x7f0c?}, {0xd8a3e5, 0x27}, {0xc000039b40, 0x2, 0xc000137f70?})
	./desktop/gotip/src/cmd/compile/internal/ssagen/ssa.go:8018 +0x16a
cmd/compile/internal/ssa.(*Func).Fatalf(0xc0003fed00, {0xd8a3e5, 0x27}, {0xc000039b40, 0x2, 0x2})
	./desktop/gotip/src/cmd/compile/internal/ssa/func.go:716 +0x279
cmd/compile/internal/ssagen.(*state).variable(0xc000022500, {0xeccbd8, 0xc000410bb0}, 0xec7a80?)
	./desktop/gotip/src/cmd/compile/internal/ssagen/ssa.go:6674 +0x145

...

Doesn't crash on 1.20.7

cc @golang/compiler

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.release-blocker

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions