Skip to content

cmd/compile: internal compiler error: 'XXXXXX': not lowered: v128, Load INTER PTR SSA #43112

Closed
@duzy

Description

@duzy

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) {
  ...
}

Activity

cuonglm

cuonglm commented on Dec 10, 2020

@cuonglm
Member

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

duzy

duzy commented on Dec 10, 2020

@duzy
Author

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

mengzhuo

mengzhuo commented on Dec 10, 2020

@mengzhuo
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

duzy commented on Dec 10, 2020

@duzy
Author

@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

duzy commented on Dec 10, 2020

@duzy
Author

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

gopherbot commented on Dec 10, 2020

@gopherbot
Contributor

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

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[/+] on Dec 11, 2020
added
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.
on Dec 11, 2020
added this to the Go1.16 milestone on Dec 11, 2020
ALTree

ALTree commented on Dec 11, 2020

@ALTree
Member

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.

locked and limited conversation to collaborators on Dec 14, 2021
added a commit that references this issue on Apr 29, 2024
0a02371
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.release-blocker

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @duzy@mengzhuo@ALTree@cuonglm@gopherbot

        Issue actions

          cmd/compile: internal compiler error: 'XXXXXX': not lowered: v128, Load INTER PTR SSA · Issue #43112 · golang/go