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: arg 0 of value v4 = Load <int> v19 v8 does not dominate (with ssacheck) #48026

Closed
ALTree opened this issue Aug 27, 2021 · 3 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@ALTree
Copy link
Member

ALTree commented Aug 27, 2021

$ go version
go version go1.17 linux/amd64
$ gotip version
go version devel go1.18-6a35e07512 Fri Aug 27 16:41:29 2021 +0000 linux/amd64
package p

var i int

type t struct {
	a, b, c, d, e int
}

func f(p t, q int) int {
	var a, b, c, d, e, f, g int
	var h, i, j, k, l, m int
	_, _, _, _, _, _, _ = a, b, c, d, e, f, g
	_, _, _, _, _, _ = h, i, j, k, l, m
	return 0
}

func g() int {
	var v t
	return f(v, 1<<i)
}
$ go build -gcflags=-d=ssa/check/seed=1 crash.go

# command-line-arguments
./crash.go:19:14: internal compiler error: 'g': arg 0 of value v4 = Load <int> v20 v9 does not dominate, arg=v20 = OffPtr <*int> [8] v10

Please file a bug report including a short program that triggers the error.

Go 1.16 is not affected.

cc @randall77 @josharian

@ALTree ALTree added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Aug 27, 2021
@ALTree ALTree added this to the Go1.18 milestone Aug 27, 2021
@randall77
Copy link
Contributor

@dr2chase Looks like this is happening in expandCalls.

/Users/khr/gowork/issue48026.go:19:14: internal compiler error: 'g': arg 0 of value v4 = Load <int> v19 v8 does not dominate, arg=v19 = OffPtr <*int> [8] v9

b1:
   v4 (+19) = Load <int> v19 v8
   If v14 → b2 b3 (likely) (+19)
b2: ← b1
   v19 (19) = OffPtr <*int> [8] v9

The OffPtr was put in the block following the block of the Load that is using it.

@cuonglm
Copy link
Member

cuonglm commented Aug 28, 2021

The problem seems to be in storeOneLoad, we emit OffPtr in the input b, but the do the Load in source.Block.

@gopherbot
Copy link
Contributor

Change https://golang.org/cl/345434 mentions this issue: cmd/compile: fix offset-generator for storeOneLoad

@golang golang locked and limited conversation to collaborators Aug 28, 2022
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.
Projects
None yet
Development

No branches or pull requests

4 participants