Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/compile: internal compiler error: Type.Elem UNION #58345

Closed
ClarkQAQ opened this issue Feb 6, 2023 · 6 comments
Closed

cmd/compile: internal compiler error: Type.Elem UNION #58345

ClarkQAQ opened this issue Feb 6, 2023 · 6 comments
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.

Comments

@ClarkQAQ
Copy link

ClarkQAQ commented Feb 6, 2023

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

$ go version
go version go1.20 linux/amd64

Does this issue reproduce with the latest release?

Yes, but it works in go1.19

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

go env Output
$ go env
GO111MODULE="auto"
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/clark/.cache/go-build"
GOENV="/home/clark/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/clark/.go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/clark/.go"
GOPRIVATE=""
GOPROXY="https://goproxy.cn,direct"
GOROOT="/usr/lib/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.20"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
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 -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build3340342221=/tmp/go-build -gno-record-gcc-switches"

What did you do?

GoPlay: https://go.dev/play/p/DfmO9bKkKal

go run main.go

What did you expect to see?

[clark@ArchOxO issus]$ go run main.go 
true

What did you see instead?

[clark@ArchOxO issus]$ go run main.go 
# command-line-arguments
./main.go:3:5: internal compiler error: Type.Elem UNION

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

cuonglm commented Feb 6, 2023

CL 458619 fixes this issue for unified IR.

Should we backport? cc @mdempsky

@cuonglm cuonglm added the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Feb 6, 2023
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/465455 mentions this issue: test: add test for issue 58345

@seankhliao seankhliao changed the title affected/package: internal compiler error: Type.Elem UNION cmd/compile: internal compiler error: Type.Elem UNION Feb 6, 2023
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Feb 6, 2023
gopherbot pushed a commit that referenced this issue Feb 7, 2023
CL 458619 fixed the problem un-intentionally, so adding test to prevent
regression happening.

Updates #58345

Change-Id: I80cf60716ef85e142d769e8621fce19c826be03d
Reviewed-on: https://go-review.googlesource.com/c/go/+/465455
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Keith Randall <khr@google.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: David Chase <drchase@google.com>
@mdempsky
Copy link
Contributor

mdempsky commented Feb 8, 2023

@cuonglm Yeah, I think backporting that CL to 1.20 seems appropriate and reasonable. Thanks.

@dr2chase
Copy link
Contributor

dr2chase commented Feb 8, 2023

@gopherbot please consider backport this to 1.20.

@gopherbot
Copy link
Contributor

Backport issue(s) opened: #58413 (for 1.20).

Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases.

@cuonglm
Copy link
Member

cuonglm commented Feb 10, 2023

Backport CL is created, closing.

@cuonglm cuonglm closed this as completed Feb 10, 2023
johanbrandhorst pushed a commit to Pryz/go that referenced this issue Feb 12, 2023
CL 458619 fixed the problem un-intentionally, so adding test to prevent
regression happening.

Updates golang#58345

Change-Id: I80cf60716ef85e142d769e8621fce19c826be03d
Reviewed-on: https://go-review.googlesource.com/c/go/+/465455
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Keith Randall <khr@google.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: David Chase <drchase@google.com>
@golang golang locked and limited conversation to collaborators Feb 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Projects
None yet
Development

No branches or pull requests

5 participants