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: 'XXXXXX': not lowered: v128, Load INTER PTR SSA #43112

Closed
duzy opened this issue Dec 10, 2020 · 7 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker
Milestone

Comments

@duzy
Copy link

duzy commented Dec 10, 2020

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

$ go version
go version devel +6c64b6db68 Thu Dec 10 03:18:00 2020 +0000 darwin/amd64

Does this issue reproduce with the latest release?

The release-branch.go1.15 is fine (go version go1.15.6 darwin/amd64).

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

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/duzy/Library/Caches/go-build"
GOENV="/Users/duzy/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/duzy/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/duzy/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="devel +6c64b6db68 Thu Dec 10 03:18:00 2020 +0000"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/dev/null"
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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/6l/hhs6f1cj07j82qy6hdph9cs40000gn/T/go-build3508354968=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

Just recompile my code with the new 'go'.

What did you expect to see?

You say it.

What did you see instead?

../go/src/extbit.io/smart/object.go:221:34: internal compiler error: '(*ScopeName).Get': not lowered: v128, Load INTER PTR SSA

goroutine 97 [running]:
runtime/debug.Stack(0x19b8180, 0xc00000e018, 0x0)
	/usr/local/go/src/runtime/debug/stack.go:24 +0x9f
cmd/compile/internal/gc.Fatalf(0xc004e65e30, 0x8, 0xc00065ed80, 0x2, 0x2)
	/usr/local/go/src/cmd/compile/internal/gc/subr.go:199 +0x1b0
cmd/compile/internal/gc.(*ssafn).Fatalf(0xc0070336e0, 0x7328000000950, 0x1892173, 0x2, 0xc001ca4c90, 0x1, 0x1)
	/usr/local/go/src/cmd/compile/internal/gc/ssa.go:7164 +0x1a5
cmd/compile/internal/ssa.(*Func).Fatalf(...)
	/usr/local/go/src/cmd/compile/internal/ssa/func.go:652
cmd/compile/internal/ssa.checkLower(0xc003d658c0)
	/usr/local/go/src/cmd/compile/internal/ssa/lower.go:36 +0x41a
cmd/compile/internal/ssa.Compile(0xc003d658c0)
	/usr/local/go/src/cmd/compile/internal/ssa/compile.go:96 +0x98d
cmd/compile/internal/gc.buildssa(0xc0004b54a0, 0x2, 0x0)
	/usr/local/go/src/cmd/compile/internal/gc/ssa.go:470 +0x11ba
cmd/compile/internal/gc.compileSSA(0xc0004b54a0, 0x2)
	/usr/local/go/src/cmd/compile/internal/gc/pgen.go:319 +0x5d
cmd/compile/internal/gc.compileFunctions.func2(0xc002c554a0, 0xc004d8b1b0, 0x2)
	/usr/local/go/src/cmd/compile/internal/gc/pgen.go:384 +0x4d
created by cmd/compile/internal/gc.compileFunctions
	/usr/local/go/src/cmd/compile/internal/gc/pgen.go:382 +0x129

where the ScopeName.Get is looking like this:

func (n *ScopeName) Get(name string) (Value, error) {
  ...
}
@cuonglm
Copy link
Member

cuonglm commented Dec 10, 2020

Seems related to expand calls again. Could you please give a minimal reproducible example, or make the code public somewhere?

@duzy
Copy link
Author

duzy commented Dec 10, 2020

@cuonglm Please try go build the https://github.com/duzy/smart (not the same as my private work copy, but should reproduce it).

@mengzhuo
Copy link
Contributor

I'm trying to reproduce by the code below but it compiled, please provide mininal code example.

package main

import (
        "fmt"
        got "go/token"
        "sync"
)

type Position struct {
        got.Position
}

type Scope struct {
        mutex    *sync.Mutex
        position Position
        outer    *Scope
        comment  string
}

type trivial struct{ position Position }

type trivialobject struct { // generally unnamed objects
        trivial
        scope *Scope
}

type knownobject struct { // generally named objects
        trivialobject
        name string
}

type ScopeName struct {
        knownobject
        scope *Scope
}

func (n *ScopeName) Get() string {
        return n.name
}

func main() {
        a := &ScopeName{}
        fmt.Println(a.Get())
}

@duzy
Copy link
Author

duzy commented Dec 10, 2020

@mengzhuo Hi, I will suggest you to compile https://github.com/duzy/smart/blob/master/cmd/main.go instead of your code segment. Because your extracted ScopeName is very different from in https://github.com/duzy/smart.

@duzy
Copy link
Author

duzy commented Dec 10, 2020

A quick try might be go get github.com/duzy/smart/cmd. Or just clone it, and do cd smart/cmd && go build, should be very quick.

@gopherbot
Copy link
Contributor

Change https://golang.org/cl/276952 mentions this issue: cmd/compile: set correct type for OpIData

@ALTree ALTree changed the title internal compiler error: 'XXXXXX': not lowered: v128, Load INTER PTR SSA cmd/compile: internal compiler error: 'XXXXXX': not lowered: v128, Load INTER PTR SSA Dec 11, 2020
@ALTree ALTree added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Dec 11, 2020
@ALTree ALTree added this to the Go1.16 milestone Dec 11, 2020
@ALTree
Copy link
Member

ALTree commented Dec 11, 2020

Tentatively labelling this as a 1.16 Release Blocker, since it's a compiler crash on a first class port, and introduced in this development cycle; just to be sure this is at least looked at before the release. Feel free to change.

@golang golang locked and limited conversation to collaborators Dec 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker
Projects
None yet
Development

No branches or pull requests

5 participants