What version of Go are you using (go version)?
$ go version
go version go1.21.6 darwin/arm64
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
GO111MODULE=''
GOARCH='arm64'
GOBIN=''
GOCACHE='/Users/phaul/Library/Caches/go-build'
GOENV='/Users/phaul/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/phaul/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='darwin'
GOPATH='/Users/phaul/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/Users/phaul/.asdf/installs/golang/1.21.6/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/Users/phaul/.asdf/installs/golang/1.21.6/go/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.21.6'
GCCGO='gccgo'
AR='ar'
CC='clang'
CXX='clang++'
CGO_ENABLED='1'
GOMOD='/dev/null'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/7f/z0kc3pxd6wz4540t2drzzlwm0000gn/T/go-build2303253187=/tmp/go-build -gno-record-gcc-switches -fno-common'
GOROOT/bin/go version: go version go1.21.6 darwin/arm64
GOROOT/bin/go tool compile -V: compile version go1.21.6
uname -v: Darwin Kernel Version 23.3.0: Wed Dec 20 21:33:31 PST 2023; root:xnu-10002.81.5~7/RELEASE_ARM64_T8112
ProductName: macOS
ProductVersion: 14.3
BuildVersion: 23D56
lldb --version: lldb-1500.0.200.58
Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)
What did you do?
The following code snippet panics the compiler:
package main
type X Int
const (
Invalid = X(iota)
Call
Int
)
func main () {
}
What did you expect to see?
Some errors reported
What did you see instead?
phaul@192 ~ % go build x.go
# command-line-arguments
: internal compiler error: panic: nil underlying
Please file a bug report including a short program that triggers the error.
https://go.dev/issue/new
What version of Go are you using (
go version)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env)?go envOutputWhat did you do?
The following code snippet panics the compiler:
package main type X Int const ( Invalid = X(iota) Call Int ) func main () { }What did you expect to see?
Some errors reported
What did you see instead?