Skip to content

cmd/compile: ICE: "runtime error: index out of range [0] with length 0" due to generic code #52162

Closed
@vogtp

Description

@vogtp

What version of Go are you using (go version)?

$ go version
go version go1.18 windows/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\vogtp\AppData\Local\go-build
set GOENV=C:\Users\vogtp\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\vogtp\go\pkg\mod
set GONOPROXY=gitlab-int.its.unibas.ch
set GONOSUMDB=gitlab-int.its.unibas.ch
set GOOS=windows
set GOPATH=C:\Users\vogtp\go
set GOPRIVATE=gitlab-int.its.unibas.ch
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Users\vogtp\sdk\go1.18
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\Users\vogtp\sdk\go1.18\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.18
set GCCGO=gccgo
set GOAMD64=v1
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=C:\Users\vogtp\go\src\gitlab-int.its.unibas.ch\vogtp\murx\go.mod
set GOWORK=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\vogtp\AppData\Local\Temp\go-build1961016563=/tmp/go-build -gno-record-gcc-switches

What did you do?

https://go.dev/play/p/TgQFW3CWM12

What did you expect to see?

A error with a file and a line number, I can goto and fix.

What did you see instead?

:1: internal compiler error: panic: runtime error: index out of range [0] with length 0

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

Go build failed.

I really did not expect a request for a bug report, but here it is! ;-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions