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

late call expansion asserts on randomly generated test cases #42236

Closed
thanm opened this issue Oct 27, 2020 · 6 comments
Closed

late call expansion asserts on randomly generated test cases #42236

thanm opened this issue Oct 27, 2020 · 6 comments

Comments

@thanm
Copy link
Member

@thanm thanm commented Oct 27, 2020

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

$ go version
go version devel +de7e50ea94 Mon Oct 26 09:58:28 2020 -0400 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=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/usr/local/google/home/thanm/.cache/go-build"
GOENV="/usr/local/google/home/thanm/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/ssd2/go1/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/ssd2/go1"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/ssd2/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/ssd2/go/pkg/tool/linux_amd64"
GCCGO="/ssd/gcc-trunk/cross/bin/gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/ssd2/go1/src/github.com/thanm/cabi-testgen/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-build132184915=/tmp/go-build -gno-record-gcc-switches"

What did you do?

Download this test case generator and run to emit code. This will emit a series of randomly generated Go functions into the dir /tmp/cabi-testgen/cabi-testgen/x:

$ cd /tmp
$ git clone https://github.com/thanm/cabi-testgen
...
$ cd cabi-testgen/cabi-testgen
$ go build .
$ ./cabi-testgen -q 20 -n 50 -s 1 -p abiTest -o x
$ cd x
$ go build

What did you expect to see?

Clean build

What did you see instead?

# abiTest/genChecker0
genChecker0/genChecker0.go:200:12: internal compiler error: 'Test1': Did not expect to find IDATA-immediate with non-trivial struct/array in it

goroutine 98 [running]:
runtime/debug.Stack(0xda9b60, 0xc00000e018, 0x0)
	/ssd2/go/src/runtime/debug/stack.go:24 +0x9f
cmd/compile/internal/gc.Fatalf(0xc0005f60f0, 0x50, 0xc0005b52f0, 0x1, 0x1)
	/ssd2/go/src/cmd/compile/internal/gc/subr.go:199 +0x1b0
cmd/compile/internal/gc.(*ssafn).Fatalf(0xc0004f0000, 0xc80c000000002, 0xcb0b26, 0x4a, 0x0, 0x0, 0x0)
	/ssd2/go/src/cmd/compile/internal/gc/ssa.go:7044 +0x1a5
cmd/compile/internal/ssa.(*Func).Fatalf(...)
	/ssd2/go/src/cmd/compile/internal/ssa/func.go:652
cmd/compile/internal/ssa.expandCalls.func8(0xc000b1b4e0, 0xc000b236d0, 0xc000b23cf0, 0xc000b23d60, 0xc00097b8c0, 0x0, 0xf402000000002, 0xc000b25260)
	/ssd2/go/src/cmd/compile/internal/ssa/expand_calls.go:348 +0x47c
cmd/compile/internal/ssa.expandCalls(0xc00058e000)
	/ssd2/go/src/cmd/compile/internal/ssa/expand_calls.go:555 +0xa0c
cmd/compile/internal/ssa.Compile(0xc00058e000)
	/ssd2/go/src/cmd/compile/internal/ssa/compile.go:96 +0x98d
cmd/compile/internal/gc.buildssa(0xc0001d8420, 0x2, 0x0)
	/ssd2/go/src/cmd/compile/internal/gc/ssa.go:463 +0xe1a
cmd/compile/internal/gc.compileSSA(0xc0001d8420, 0x2)
	/ssd2/go/src/cmd/compile/internal/gc/pgen.go:320 +0x5d
cmd/compile/internal/gc.compileFunctions.func2(0xc00071ed80, 0xc00053eab0, 0x2)
	/ssd2/go/src/cmd/compile/internal/gc/pgen.go:385 +0x4d
created by cmd/compile/internal/gc.compileFunctions
	/ssd2/go/src/cmd/compile/internal/gc/pgen.go:383 +0x129

# abiTest/genChecker18
genChecker18/genChecker18.go:2525:12: internal compiler error: 'Test41': panic during expand calls while compiling Test41:

runtime error: index out of range [1] with length 1

goroutine 74 [running]:
cmd/compile/internal/ssa.Compile.func1(0xc0009eeea0, 0xc000d6b760)
	/ssd2/go/src/cmd/compile/internal/ssa/compile.go:48 +0xa5
panic(0xc5afe0, 0xc000537788)
	/ssd2/go/src/runtime/panic.go:965 +0x1b9
cmd/compile/internal/types.(*Type).Field(...)
	/ssd2/go/src/cmd/compile/internal/types/type.go:852
cmd/compile/internal/types.(*Type).FieldOff(0xc0008e17a0, 0x1, 0xc0009eb878)
	/ssd2/go/src/cmd/compile/internal/types/type.go:1345 +0x6f
cmd/compile/internal/ssa.expandCalls(0xc000d6b760)
	/ssd2/go/src/cmd/compile/internal/ssa/expand_calls.go:675 +0x1ad4
cmd/compile/internal/ssa.Compile(0xc000d6b760)
	/ssd2/go/src/cmd/compile/internal/ssa/compile.go:96 +0x98d
cmd/compile/internal/gc.buildssa(0xc0007d3b80, 0x3, 0x0)
	/ssd2/go/src/cmd/compile/internal/gc/ssa.go:463 +0xe1a
cmd/compile/internal/gc.compileSSA(0xc0007d3b80, 0x3)
	/ssd2/go/src/cmd/compile/internal/gc/pgen.go:320 +0x5d
cmd/compile/internal/gc.compileFunctions.func2(0xc00099f1a0, 0xc000489d40, 0x3)
	/ssd2/go/src/cmd/compile/internal/gc/pgen.go:385 +0x4d
created by cmd/compile/internal/gc.compileFunctions
	/ssd2/go/src/cmd/compile/internal/gc/pgen.go:383 +0x129



goroutine 74 [running]:
runtime/debug.Stack(0xda9b60, 0xc00000e018, 0x0)
	/ssd2/go/src/runtime/debug/stack.go:24 +0x9f
cmd/compile/internal/gc.Fatalf(0xc000ea0880, 0x32, 0xc00093e7d0, 0x5, 0x5)
	/ssd2/go/src/cmd/compile/internal/gc/subr.go:199 +0x1b0
cmd/compile/internal/gc.(*ssafn).Fatalf(0xc000eacd20, 0x9dd0c000000002, 0xcaa9e5, 0x2c, 0xc000ec8340, 0x4, 0x4)
	/ssd2/go/src/cmd/compile/internal/gc/ssa.go:7044 +0x1a5
cmd/compile/internal/ssa.(*Func).Fatalf(...)
	/ssd2/go/src/cmd/compile/internal/ssa/func.go:652
cmd/compile/internal/ssa.Compile.func1(0xc0009eeea0, 0xc000d6b760)
	/ssd2/go/src/cmd/compile/internal/ssa/compile.go:53 +0x22b
panic(0xc5afe0, 0xc000537788)
	/ssd2/go/src/runtime/panic.go:965 +0x1b9
cmd/compile/internal/types.(*Type).Field(...)
	/ssd2/go/src/cmd/compile/internal/types/type.go:852
cmd/compile/internal/types.(*Type).FieldOff(0xc0008e17a0, 0x1, 0xc0009eb878)
	/ssd2/go/src/cmd/compile/internal/types/type.go:1345 +0x6f
cmd/compile/internal/ssa.expandCalls(0xc000d6b760)
	/ssd2/go/src/cmd/compile/internal/ssa/expand_calls.go:675 +0x1ad4
cmd/compile/internal/ssa.Compile(0xc000d6b760)
	/ssd2/go/src/cmd/compile/internal/ssa/compile.go:96 +0x98d
cmd/compile/internal/gc.buildssa(0xc0007d3b80, 0x3, 0x0)
	/ssd2/go/src/cmd/compile/internal/gc/ssa.go:463 +0xe1a
cmd/compile/internal/gc.compileSSA(0xc0007d3b80, 0x3)
	/ssd2/go/src/cmd/compile/internal/gc/pgen.go:320 +0x5d
cmd/compile/internal/gc.compileFunctions.func2(0xc00099f1a0, 0xc000489d40, 0x3)
	/ssd2/go/src/cmd/compile/internal/gc/pgen.go:385 +0x4d
created by cmd/compile/internal/gc.compileFunctions
	/ssd2/go/src/cmd/compile/internal/gc/pgen.go:383 +0x129

# abiTest/genChecker14
genChecker14/genChecker14.go:1578:12: internal compiler error: 'Test23': panic during expand calls while compiling Test23:

runtime error: index out of range [1] with length 1

goroutine 77 [running]:
cmd/compile/internal/ssa.Compile.func1(0xc00062aea0, 0xc0006398c0)
	/ssd2/go/src/cmd/compile/internal/ssa/compile.go:48 +0xa5
panic(0xc5afe0, 0xc00001b2f0)
	/ssd2/go/src/runtime/panic.go:965 +0x1b9
cmd/compile/internal/types.(*Type).Field(...)
	/ssd2/go/src/cmd/compile/internal/types/type.go:852
cmd/compile/internal/types.(*Type).FieldOff(0xc000817f20, 0x1, 0xc000627878)
	/ssd2/go/src/cmd/compile/internal/types/type.go:1345 +0x6f
cmd/compile/internal/ssa.expandCalls(0xc0006398c0)
	/ssd2/go/src/cmd/compile/internal/ssa/expand_calls.go:675 +0x1ad4
cmd/compile/internal/ssa.Compile(0xc0006398c0)
	/ssd2/go/src/cmd/compile/internal/ssa/compile.go:96 +0x98d
cmd/compile/internal/gc.buildssa(0xc0007442c0, 0x1, 0x0)
	/ssd2/go/src/cmd/compile/internal/gc/ssa.go:463 +0xe1a
cmd/compile/internal/gc.compileSSA(0xc0007442c0, 0x1)
	/ssd2/go/src/cmd/compile/internal/gc/pgen.go:320 +0x5d
cmd/compile/internal/gc.compileFunctions.func2(0xc0008a26c0, 0xc000899f40, 0x1)
	/ssd2/go/src/cmd/compile/internal/gc/pgen.go:385 +0x4d
created by cmd/compile/internal/gc.compileFunctions
	/ssd2/go/src/cmd/compile/internal/gc/pgen.go:383 +0x129



goroutine 77 [running]:
runtime/debug.Stack(0xda9b60, 0xc00013a008, 0x0)
	/ssd2/go/src/runtime/debug/stack.go:24 +0x9f
cmd/compile/internal/gc.Fatalf(0xc000195340, 0x32, 0xc0000ee1e0, 0x5, 0x5)
	/ssd2/go/src/cmd/compile/internal/gc/subr.go:199 +0x1b0
cmd/compile/internal/gc.(*ssafn).Fatalf(0xc000daf2c0, 0x62a0c000000002, 0xcaa9e5, 0x2c, 0xc000db5800, 0x4, 0x4)
	/ssd2/go/src/cmd/compile/internal/gc/ssa.go:7044 +0x1a5
cmd/compile/internal/ssa.(*Func).Fatalf(...)
	/ssd2/go/src/cmd/compile/internal/ssa/func.go:652
cmd/compile/internal/ssa.Compile.func1(0xc00062aea0, 0xc0006398c0)
	/ssd2/go/src/cmd/compile/internal/ssa/compile.go:53 +0x22b
panic(0xc5afe0, 0xc00001b2f0)
	/ssd2/go/src/runtime/panic.go:965 +0x1b9
cmd/compile/internal/types.(*Type).Field(...)
	/ssd2/go/src/cmd/compile/internal/types/type.go:852
cmd/compile/internal/types.(*Type).FieldOff(0xc000817f20, 0x1, 0xc000627878)
	/ssd2/go/src/cmd/compile/internal/types/type.go:1345 +0x6f
cmd/compile/internal/ssa.expandCalls(0xc0006398c0)
	/ssd2/go/src/cmd/compile/internal/ssa/expand_calls.go:675 +0x1ad4
cmd/compile/internal/ssa.Compile(0xc0006398c0)
	/ssd2/go/src/cmd/compile/internal/ssa/compile.go:96 +0x98d
cmd/compile/internal/gc.buildssa(0xc0007442c0, 0x1, 0x0)
	/ssd2/go/src/cmd/compile/internal/gc/ssa.go:463 +0xe1a
cmd/compile/internal/gc.compileSSA(0xc0007442c0, 0x1)
	/ssd2/go/src/cmd/compile/internal/gc/pgen.go:320 +0x5d
cmd/compile/internal/gc.compileFunctions.func2(0xc0008a26c0, 0xc000899f40, 0x1)
	/ssd2/go/src/cmd/compile/internal/gc/pgen.go:385 +0x4d
created by cmd/compile/internal/gc.compileFunctions
	/ssd2/go/src/cmd/compile/internal/gc/pgen.go:383 +0x129

# abiTest/genChecker12
genChecker12/genChecker12.go:1059:12: internal compiler error: 'Test13': panic during expand calls while compiling Test13:

runtime error: index out of range [1] with length 1

goroutine 88 [running]:
cmd/compile/internal/ssa.Compile.func1(0xc000648ea0, 0xc00013de40)
	/ssd2/go/src/cmd/compile/internal/ssa/compile.go:48 +0xa5
panic(0xc5afe0, 0xc000dd5d58)
	/ssd2/go/src/runtime/panic.go:965 +0x1b9
cmd/compile/internal/types.(*Type).Field(...)
	/ssd2/go/src/cmd/compile/internal/types/type.go:852
cmd/compile/internal/types.(*Type).FieldOff(0xc0007c1bc0, 0x1, 0xc000645878)
	/ssd2/go/src/cmd/compile/internal/types/type.go:1345 +0x6f
cmd/compile/internal/ssa.expandCalls(0xc00013de40)
	/ssd2/go/src/cmd/compile/internal/ssa/expand_calls.go:675 +0x1ad4
cmd/compile/internal/ssa.Compile(0xc00013de40)
	/ssd2/go/src/cmd/compile/internal/ssa/compile.go:96 +0x98d
cmd/compile/internal/gc.buildssa(0xc0002854a0, 0x1, 0x0)
	/ssd2/go/src/cmd/compile/internal/gc/ssa.go:463 +0xe1a
cmd/compile/internal/gc.compileSSA(0xc0002854a0, 0x1)
	/ssd2/go/src/cmd/compile/internal/gc/pgen.go:320 +0x5d
cmd/compile/internal/gc.compileFunctions.func2(0xc00013a9c0, 0xc00014cd00, 0x1)
	/ssd2/go/src/cmd/compile/internal/gc/pgen.go:385 +0x4d
created by cmd/compile/internal/gc.compileFunctions
	/ssd2/go/src/cmd/compile/internal/gc/pgen.go:383 +0x129

xx


goroutine 88 [running]:
runtime/debug.Stack(0xda9b60, 0xc000202008, 0x0)
	/ssd2/go/src/runtime/debug/stack.go:24 +0x9f
cmd/compile/internal/gc.Fatalf(0xc00017bf40, 0x32, 0xc0001f2a00, 0x5, 0x5)
	/ssd2/go/src/cmd/compile/internal/gc/subr.go:199 +0x1b0
cmd/compile/internal/gc.(*ssafn).Fatalf(0xc000c10660, 0x4230c000000002, 0xcaa9e5, 0x2c, 0xc000c2c200, 0x4, 0x4)
	/ssd2/go/src/cmd/compile/internal/gc/ssa.go:7044 +0x1a5
cmd/compile/internal/ssa.(*Func).Fatalf(...)
	/ssd2/go/src/cmd/compile/internal/ssa/func.go:652
cmd/compile/internal/ssa.Compile.func1(0xc000648ea0, 0xc00013de40)
	/ssd2/go/src/cmd/compile/internal/ssa/compile.go:53 +0x22b
panic(0xc5afe0, 0xc000dd5d58)
	/ssd2/go/src/runtime/panic.go:965 +0x1b9
cmd/compile/internal/types.(*Type).Field(...)
	/ssd2/go/src/cmd/compile/internal/types/type.go:852
cmd/compile/internal/types.(*Type).FieldOff(0xc0007c1bc0, 0x1, 0xc000645878)
	/ssd2/go/src/cmd/compile/internal/types/type.go:1345 +0x6f
cmd/compile/internal/ssa.expandCalls(0xc00013de40)
	/ssd2/go/src/cmd/compile/internal/ssa/expand_calls.go:675 +0x1ad4
cmd/compile/internal/ssa.Compile(0xc00013de40)
	/ssd2/go/src/cmd/compile/internal/ssa/compile.go:96 +0x98d
cmd/compile/internal/gc.buildssa(0xc0002854a0, 0x1, 0x0)
	/ssd2/go/src/cmd/compile/internal/gc/ssa.go:463 +0xe1a
cmd/compile/internal/gc.compileSSA(0xc0002854a0, 0x1)
	/ssd2/go/src/cmd/compile/internal/gc/pgen.go:320 +0x5d
cmd/compile/internal/gc.compileFunctions.func2(0xc00013a9c0, 0xc00014cd00, 0x1)
	/ssd2/go/src/cmd/compile/internal/gc/pgen.go:385 +0x4d
created by cmd/compile/internal/gc.compileFunctions
	/ssd2/go/src/cmd/compile/internal/gc/pgen.go:383 +0x129

# abiTest/genChecker2
genChecker2/genChecker2.go:2343:12: internal compiler error: 'Test38': not lowered: v29, Load COMPLEX64 PTR SSA

goroutine 73 [running]:
runtime/debug.Stack(0xda9b60, 0xc00000e018, 0x0)
	/ssd2/go/src/runtime/debug/stack.go:24 +0x9f
cmd/compile/internal/gc.Fatalf(0xc000ec9e78, 0x8, 0xc0004369e0, 0x2, 0x2)
	/ssd2/go/src/cmd/compile/internal/gc/subr.go:199 +0x1b0
cmd/compile/internal/gc.(*ssafn).Fatalf(0xc000d6f050, 0x9270c000000002, 0xc86cc2, 0x2, 0xc000b4a840, 0x1, 0x1)
	/ssd2/go/src/cmd/compile/internal/gc/ssa.go:7044 +0x1a5
cmd/compile/internal/ssa.(*Func).Fatalf(...)
	/ssd2/go/src/cmd/compile/internal/ssa/func.go:652
cmd/compile/internal/ssa.checkLower(0xc000cf49a0)
	/ssd2/go/src/cmd/compile/internal/ssa/lower.go:36 +0x41a
cmd/compile/internal/ssa.Compile(0xc000cf49a0)
	/ssd2/go/src/cmd/compile/internal/ssa/compile.go:96 +0x98d
cmd/compile/internal/gc.buildssa(0xc0007ed760, 0x0, 0x0)
	/ssd2/go/src/cmd/compile/internal/gc/ssa.go:463 +0xe1a
cmd/compile/internal/gc.compileSSA(0xc0007ed760, 0x0)
	/ssd2/go/src/cmd/compile/internal/gc/pgen.go:320 +0x5d
cmd/compile/internal/gc.compileFunctions.func2(0xc0009947e0, 0xc000942310, 0x0)
	/ssd2/go/src/cmd/compile/internal/gc/pgen.go:385 +0x4d
created by cmd/compile/internal/gc.compileFunctions
	/ssd2/go/src/cmd/compile/internal/gc/pgen.go:383 +0x129

@thanm
Copy link
Member Author

@thanm thanm commented Oct 27, 2020

@dr2chase
Copy link
Contributor

@dr2chase dr2chase commented Oct 28, 2020

"Works for me!"

I need to see what changed between then and now, and if my arg-lowering changes affected this.

GOSSAFUNC=main go build -gcflags=all=-d=ssa/check/on 
# runtime
dumped SSA to /Users/drchase/work/cabi-testgen/cabi-testgen/x/ssa.html
# abiTest
dumped SSA to ./ssa.html

and in ssa.html:
Screen Shot 2020-10-28 at 6 17 27 PM

@dr2chase
Copy link
Contributor

@dr2chase dr2chase commented Oct 28, 2020

PS your horrifying test case also compiles w/o incident for ppc64le, arm, 386, and mips/softfloat.

@thanm
Copy link
Member Author

@thanm thanm commented Oct 28, 2020

Sorry-- since filing the bug I have been messing with the testcase generator to add support for blank params and struct fields, so most likely it is not emitting quite the same code with that seed.

Here's a reduced case for one of the failures:

package somewhatsmaller

type StructF0S1 struct {
}

type StructF0S3 struct {
	F0 StructF0S4
	F1 uint64
	F2 byte
	F3 byte
}

type StructF0S4 struct {
	F0 ArrayF0S1E1
	F1 StructF0S5
}

type StructF0S5 struct {
}

type ArrayF0S1E1 [1]float64

type StructF1S0 struct {
	F0 *StructF1S1
	F1 ArrayF1S0E3
	F2 StructF1S2
	F3 float32
	F4 uint64
}

type StructF1S1 struct {
	F0 byte
}

type StructF1S2 struct {
}

type StructF1S3 struct {
	F0 int64
	F1 int8
}

type StructF1S4 struct {
	F0 ArrayF1S1E3
}

type StructF1S5 struct {
	F0 ArrayF1S4E1
	F1 StructF1S6
}

type StructF1S6 struct {
}

type ArrayF1S0E3 [3]int8

type ArrayF1S1E3 [3]ArrayF1S2E4

type ArrayF1S2E4 [4]byte

type ArrayF1S3E1 [1]StructF1S5

type ArrayF1S4E1 [1]float32

func Test1(p0 uint16, p3 StructF1S0) ArrayF1S3E1 {
	rc3 := ArrayF1S3E1{StructF1S5{ArrayF1S4E1{float32(6.56723e+37)}, StructF1S6{}}}
	if p0 == 0 {
		return rc3
	}
	return Test1(p0-1, p3)
}

That should produce "internal compiler error: 'Test1': Did not expect to find IDATA-immediate with non-trivial struct/array in it" on master at tip.

I'll see about sifting through the unpleasant code and creating (somewhat) minimized test cases.

@dr2chase
Copy link
Contributor

@dr2chase dr2chase commented Oct 29, 2020

Got it, cause is insufficiently imaginative (in terms of likely pathologies) code I fixed in a CL that I am about to submit, that is happy with your example. The bad case:

		case types.TARRAY:
			elt := t.Elem()
			if t.NumElem() == 1 && t.Width == regSize && elt.Width == regSize {
				t = removeTrivialWrapperTypes(t)
				if t.Etype == types.TSTRUCT || t.Etype == types.TARRAY {
					f.Fatalf("Did not expect to find IDATA-immediate with non-trivial struct/array in it")
				}
				break // handle the leaf type.
			}

versus, done right, same function, for structures:

		case types.TSTRUCT:
			if t.NumFields() == 1 && t.Field(0).Type.Width == t.Width && t.Width == regSize {
				// This peculiar test deals with accesses to immediate interface data.
                                 // ...
				t = removeTrivialWrapperTypes(t)

				// it could be a leaf type, but the "leaf" could be complex64 (for example)
				return splitStore(dest, source, mem, v, t, offset, firstStorePos)
			}

I.e., the array case should have recurred.

The new code (refactored, combined, renamed, sorry for all the changes):

		// For nodes that cannot be taken apart -- OpSelectN, other structure selectors.
		switch t.Etype {
		case types.TARRAY:
			elt := t.Elem()
			if source.Type != t && t.NumElem() == 1 && elt.Width == t.Width && t.Width == regSize {
				t = removeTrivialWrapperTypes(t)
				// it could be a leaf type, but the "leaf" could be complex64 (for example)
				return storeArgOrLoad(pos, b, base, source, mem, t, offset)
			}
			for i := int64(0); i < t.NumElem(); i++ {
				sel := source.Block.NewValue1I(pos, OpArraySelect, elt, i, source)
				mem = storeArgOrLoad(pos, b, base, sel, mem, elt, offset+i*elt.Width)
				pos = pos.WithNotStmt()
			}
			return mem
@gopherbot
Copy link

@gopherbot gopherbot commented Oct 29, 2020

Change https://golang.org/cl/262117 mentions this issue: cmd/compile: delay expansion of OpArg until expand_calls

@gopherbot gopherbot closed this in 15f01d6 Oct 29, 2020
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
You can’t perform that action at this time.