Skip to content

cmd/compile: ICE when compiling simple loop #80534

Description

@randall77
package main

var x [3][3]int

func main() {
	for i := range 3 {
		x[i][i] = 0
	}
}

Crashes the compiler with:

tmp2.go:5:6: internal compiler error: 'main': value i (nil) incorrectly live at entry

Probably related to rewriting loops to clear builtin calls.

Found while trying more cases that might happen in #80519

Metadata

Metadata

Assignees

Labels

NeedsFixThe 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

Status
Todo

Relationships

None yet

Development

No branches or pull requests

Issue actions