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: two stores live simultaneously on ARM with -N #26163

Closed
ALTree opened this issue Jun 30, 2018 · 3 comments

Comments

Projects
None yet
3 participants
@ALTree
Copy link
Member

commented Jun 30, 2018

$ gotip version
go version devel +0dc814cd7f Sat Jun 30 01:04:30 2018 +0000 linux/amd64

The following program (reduced from a gosmith-generated one):

package p

var i int
var A = ([]*int{})[i]

var F func(float64, complex128) int
var C chan complex128
var B = F(1, 1+(<-C))

crashes the tip compiler when compiled for GOARCH=arm with optimizations disabled:

$ GOARCH=arm gotip tool compile -N crash.go

<autogenerated>:1: internal compiler error: two stores live simultaneously: v112 and v102

goroutine 1 [running]:
runtime/debug.Stack(0x0, 0x0, 0x0)
	/home/alberto/go/src/runtime/debug/stack.go:24 +0xa7
cmd/compile/internal/gc.Fatalf(0xcc3d61, 0x29, 0xc000350b00, 0x2, 0x2)
	/home/alberto/go/src/cmd/compile/internal/gc/subr.go:182 +0x1f7
cmd/compile/internal/gc.(*ssafn).Fatalf(0xc00000fb30, 0x100000000001, 0xcc3d61, 0x29, 0xc000350b00, 0x2, 0x2)
	/home/alberto/go/src/cmd/compile/internal/gc/ssa.go:5584 +0x67
cmd/compile/internal/ssa.(*Func).Fatalf(0xc00036c2c0, 0xcc3d61, 0x29, 0xc000350b00, 0x2, 0x2)
	/home/alberto/go/src/cmd/compile/internal/ssa/func.go:562 +0x73
cmd/compile/internal/ssa.storeOrder(0xc0003c6000, 0x46, 0x48, 0xc00000fec0, 0xc0003ca240, 0x83, 0x83, 0xc0003707d0, 0xc000311490, 0xcb38ca)
	/home/alberto/go/src/cmd/compile/internal/ssa/schedule.go:337 +0x4c0
cmd/compile/internal/ssa.writebarrier(0xc00036c2c0)
	/home/alberto/go/src/cmd/compile/internal/ssa/writebarrier.go:112 +0x6c7
cmd/compile/internal/ssa.Compile(0xc00036c2c0)
	/home/alberto/go/src/cmd/compile/internal/ssa/compile.go:70 +0x30e
cmd/compile/internal/gc.buildssa(0xc00036c160, 0x0, 0x0)
	/home/alberto/go/src/cmd/compile/internal/gc/ssa.go:211 +0xaa7
cmd/compile/internal/gc.compileSSA(0xc00036c160, 0x0)
	/home/alberto/go/src/cmd/compile/internal/gc/pgen.go:259 +0x39
cmd/compile/internal/gc.compile(0xc00036c160)
	/home/alberto/go/src/cmd/compile/internal/gc/pgen.go:238 +0x1a0
cmd/compile/internal/gc.funccompile(0xc00036c160)
	/home/alberto/go/src/cmd/compile/internal/gc/pgen.go:209 +0xbd
cmd/compile/internal/gc.fninit(0xc000046ab0, 0x2, 0x2)
	/home/alberto/go/src/cmd/compile/internal/gc/init.go:212 +0xaab
cmd/compile/internal/gc.Main(0xccda48)
	/home/alberto/go/src/cmd/compile/internal/gc/main.go:644 +0x2bea
main.main()
	/home/alberto/go/src/cmd/compile/main.go:51 +0x96

The code compiles fine on go1.10.

@ALTree

This comment has been minimized.

Copy link
Member Author

commented Jun 30, 2018

git bisect points to b08a9b7 (all: use new softfloat on GOARM=5) as the first bad commit.

cc @cherrymui

@gopherbot

This comment has been minimized.

Copy link

commented Jul 1, 2018

Change https://golang.org/cl/121856 mentions this issue: cmd/compile: run generic deadcode in -N mode

@josharian

This comment has been minimized.

Copy link
Contributor

commented Jul 2, 2018

@ALTree thanks very much for all the fuzzing.

@gopherbot gopherbot closed this in 3f54e85 Jul 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.