Skip to content

"internal compiler error: assertion failed" with generic code #53834

Not planned
@quan-nguyen2

Description

@quan-nguyen2

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

$ go version
go version go1.18.4 darwin/arm64

it happens with go playground also (with version 1.18)

Does this issue reproduce with the latest release?

yes

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

go env Output
```
GO111MODULE=""
GOARCH="arm64"
GOBIN=""
GOCACHE="/Users/quannk/Library/Caches/go-build"
GOENV="/Users/quannk/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/quannk/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/quannk/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/opt/homebrew/Cellar/go/1.18.4/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/opt/homebrew/Cellar/go/1.18.4/libexec/pkg/tool/darwin_arm64"
GOVCS=""
GOVERSION="go1.18.4"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/quannk/ad/advertisement/golang/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/g3/kggtblcx2y14_mlgh0z6pmzc0000gp/T/go-build531919184=/tmp/go-build -gno-record-gcc-switches -fno-common"
```

What did you do?

the bug can be reproduced here:

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

What did you expect to see?

no error when compile the program

What did you see instead?

error when compile

./prog.go:7:10: internal compiler error: assertion failed

Activity

quan-nguyen2

quan-nguyen2 commented on Jul 13, 2022

@quan-nguyen2
Author

this bug is the same with #53762
but it happens on 1.18.4 as well (1.18.4 is marked as stable version)

hopehook

hopehook commented on Jul 13, 2022

@hopehook
Member

The patch https://go-review.googlesource.com/c/go/+/416736 can fix this issue also.

seankhliao

seankhliao commented on Jul 13, 2022

@seankhliao
Member

Duplicate of #53762

locked and limited conversation to collaborators on Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @hopehook@gopherbot@seankhliao@quan-nguyen2

        Issue actions

          "internal compiler error: assertion failed" with generic code · Issue #53834 · golang/go