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

ALTree opened this issue Aug 27, 2021 · 3 comments


Copy link

@ALTree 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 this to the Go1.18 milestone Aug 27, 2021
Copy link

@randall77 randall77 commented Aug 27, 2021

@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

   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.


Copy link

@cuonglm 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.


Copy link

@gopherbot gopherbot commented Aug 28, 2021

Change mentions this issue: cmd/compile: fix offset-generator for storeOneLoad


@gopherbot gopherbot closed this in 6df3aac Aug 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants