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: mayCall SLICE2ARRPTR tc(1) PTR-*[24]byte #46720

Closed
mtharp opened this issue Jun 12, 2021 · 2 comments
Closed

Comments

@mtharp
Copy link

@mtharp mtharp commented Jun 12, 2021

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

$ go version
go version go1.17beta1 linux/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
GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/x/.cache/go-build"
GOENV="/home/x/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/x/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/x/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/opt/go/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/opt/go/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.17beta1"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/x/repro/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build3746276081=/tmp/go-build -gno-record-gcc-switches"
uname -sr: Linux 5.11.18-200.fc33.x86_64
/lib64/libc.so.6: GNU C Library (GNU libc) stable release version 2.32.
gdb --version: GNU gdb (GDB) Fedora 10.1-4.fc33

What did you do?

import "golang.org/x/crypto/nacl/secretbox"

func main() {
	nonce := make([]byte, 24)
	var key [32]byte
	secretbox.Seal(nil, nil, (*[24]byte)(nonce), &key)
}

What did you expect to see?

Compile succeeds

What did you see instead?

# dummy
./main.go:9:38: internal compiler error: mayCall 
.   SLICE2ARRPTR tc(1) PTR-*[24]byte # main.go:9 PTR-*[24]byte
.   .   NAME-main.nonce tc(1) Class:PEXTERN Offset:0 Used SLICE-[]byte # main.go:5
@ALTree
Copy link
Member

@ALTree ALTree commented Jun 12, 2021

Similar: #45917.

cc @mdempsky

Loading

@gopherbot
Copy link

@gopherbot gopherbot commented Jun 13, 2021

Change https://golang.org/cl/327649 mentions this issue: cmd/compile: allow ir.OSLICE2ARRPTR in mayCall

Loading

@gopherbot gopherbot closed this in 67b1b6a Jun 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants