<p dir="auto">Please answer these questions before submitting your issue. Thanks!</p>
<ol dir="auto">
<li>What version of Go are you using (<code class="notranslate">go version</code>)?<br>
go version go1.6 linux/amd64<br>
go 1.5 also fails but go 1.4 compiles the code successfully</li>
<li>What operating system and processor architecture are you using (<code class="notranslate">go env</code>)?</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="GOARCH=&quot;amd64&quot;
GOBIN=&quot;&quot;
GOEXE=&quot;&quot;
GOHOSTARCH=&quot;amd64&quot;
GOHOSTOS=&quot;linux&quot;
GOOS=&quot;linux&quot;
GOPATH=&quot;/home/user&quot;
GORACE=&quot;&quot;
GOROOT=&quot;/usr/lib/go&quot;
GOTOOLDIR=&quot;/usr/lib/go/pkg/tool/linux_amd64&quot;
GO15VENDOREXPERIMENT=&quot;1&quot;
CC=&quot;gcc&quot;
GOGCCFLAGS=&quot;-fPIC -m64 -pthread -fmessage-length=0&quot;
CXX=&quot;g++&quot;
CGO_ENABLED=&quot;1&quot;"><pre class="notranslate"><code class="notranslate">GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/user"
GORACE=""
GOROOT="/usr/lib/go"
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GO15VENDOREXPERIMENT="1"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"
</code></pre></div>
<ol dir="auto">
<li>What did you do?<br>
I used a shell script to generate some code, specifically a large ~200,000 line slice literal.  Code is not public and I have not yet been able to reduce it.</li>
<li>What did you expect to see?<br>
The code to build successfully.</li>
<li>What did you see instead?</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="go build file1.go file2.go
# command-line-arguments
panic: runtime error: slice bounds out of range

goroutine 1 [running]:
panic(0x802ba0, 0xc82000e170)
        /usr/lib/go/src/runtime/panic.go:464 +0x3e6
cmd/compile/internal/gc.newliveness(0xc8307042d0, 0xc834448120, 0xc89e58a000, 0x5d235, 0x71800, 0xc89ed48000, 0x10705, 0x12c00, 0x9be070cd77c7929b)
        /usr/lib/go/src/cmd/compile/internal/gc/plive.go:691 +0xc8e
cmd/compile/internal/gc.liveness(0xc8307042d0, 0xc834448120, 0xc84ea6ef80, 0xc84ea6f000)
        /usr/lib/go/src/cmd/compile/internal/gc/plive.go:1782 +0x2cf
cmd/compile/internal/gc.compile(0xc8307042d0)
        /usr/lib/go/src/cmd/compile/internal/gc/pgen.go:541 +0xdf2
cmd/compile/internal/gc.funccompile(0xc8307042d0)
        /usr/lib/go/src/cmd/compile/internal/gc/dcl.go:1450 +0x1c0
cmd/compile/internal/gc.fninit(0xc83353a520)
        /usr/lib/go/src/cmd/compile/internal/gc/init.go:184 +0x8a4
cmd/compile/internal/gc.Main()
        /usr/lib/go/src/cmd/compile/internal/gc/lex.go:477 +0x2150
cmd/compile/internal/amd64.Main()
        /usr/lib/go/src/cmd/compile/internal/amd64/galign.go:127 +0x58d
main.main()
        /usr/lib/go/src/cmd/compile/main.go:32 +0x395"><pre class="notranslate"><code class="notranslate">go build file1.go file2.go
# command-line-arguments
panic: runtime error: slice bounds out of range

goroutine 1 [running]:
panic(0x802ba0, 0xc82000e170)
        /usr/lib/go/src/runtime/panic.go:464 +0x3e6
cmd/compile/internal/gc.newliveness(0xc8307042d0, 0xc834448120, 0xc89e58a000, 0x5d235, 0x71800, 0xc89ed48000, 0x10705, 0x12c00, 0x9be070cd77c7929b)
        /usr/lib/go/src/cmd/compile/internal/gc/plive.go:691 +0xc8e
cmd/compile/internal/gc.liveness(0xc8307042d0, 0xc834448120, 0xc84ea6ef80, 0xc84ea6f000)
        /usr/lib/go/src/cmd/compile/internal/gc/plive.go:1782 +0x2cf
cmd/compile/internal/gc.compile(0xc8307042d0)
        /usr/lib/go/src/cmd/compile/internal/gc/pgen.go:541 +0xdf2
cmd/compile/internal/gc.funccompile(0xc8307042d0)
        /usr/lib/go/src/cmd/compile/internal/gc/dcl.go:1450 +0x1c0
cmd/compile/internal/gc.fninit(0xc83353a520)
        /usr/lib/go/src/cmd/compile/internal/gc/init.go:184 +0x8a4
cmd/compile/internal/gc.Main()
        /usr/lib/go/src/cmd/compile/internal/gc/lex.go:477 +0x2150
cmd/compile/internal/amd64.Main()
        /usr/lib/go/src/cmd/compile/internal/amd64/galign.go:127 +0x58d
main.main()
        /usr/lib/go/src/cmd/compile/main.go:32 +0x395
</code></pre></div>
<p dir="auto">The go 1.6 compiler panics on this 2.25 Mbyte source file containing a slice with 13240 elements: <a href="https://drive.google.com/file/d/0B2AF520HhpuzdzZhSVpPZGZkTUU/view" rel="nofollow">https://drive.google.com/file/d/0B2AF520HhpuzdzZhSVpPZGZkTUU/view</a></p>
<p dir="auto">go1.6 linux/amd64<br>
GOARCH="amd64"<br>
GOOS="linux"</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ go build buildme.go
# command-line-arguments
panic: runtime error: makeslice: len out of range

goroutine 1 [running]:
panic(0x804f60, 0xc86085dd70)
        /usr/lib/google-golang/src/runtime/panic.go:483 +0x3ef
cmd/compile/internal/gc.newliveness(0xc82018b9e0, 0xc8200a0000, 0xc865c44000, 0x2d416, 0x2e400, 0xc866950000, 0xcee1, 0xf000, 0xc9cda4b11aac74db)
        /usr/lib/google-golang/src/cmd/compile/internal/gc/plive.go:687 +0x161
cmd/compile/internal/gc.liveness(0xc82018b9e0, 0xc8200a0000, 0xc848dee900, 0xc848dee980)
        /usr/lib/google-golang/src/cmd/compile/internal/gc/plive.go:1782 +0x2cf
cmd/compile/internal/gc.compile(0xc82018b9e0)
        /usr/lib/google-golang/src/cmd/compile/internal/gc/pgen.go:541 +0xdf2
cmd/compile/internal/gc.funccompile(0xc82018b9e0)
        /usr/lib/google-golang/src/cmd/compile/internal/gc/dcl.go:1450 +0x1c0
cmd/compile/internal/gc.Main()
        /usr/lib/google-golang/src/cmd/compile/internal/gc/lex.go:472 +0x2116
cmd/compile/internal/amd64.Main()
        /usr/lib/google-golang/src/cmd/compile/internal/amd64/galign.go:127 +0x58d
main.main()
        /usr/lib/google-golang/src/cmd/compile/main.go:32 +0x395"><pre class="notranslate"><code class="notranslate">$ go build buildme.go
# command-line-arguments
panic: runtime error: makeslice: len out of range

goroutine 1 [running]:
panic(0x804f60, 0xc86085dd70)
        /usr/lib/google-golang/src/runtime/panic.go:483 +0x3ef
cmd/compile/internal/gc.newliveness(0xc82018b9e0, 0xc8200a0000, 0xc865c44000, 0x2d416, 0x2e400, 0xc866950000, 0xcee1, 0xf000, 0xc9cda4b11aac74db)
        /usr/lib/google-golang/src/cmd/compile/internal/gc/plive.go:687 +0x161
cmd/compile/internal/gc.liveness(0xc82018b9e0, 0xc8200a0000, 0xc848dee900, 0xc848dee980)
        /usr/lib/google-golang/src/cmd/compile/internal/gc/plive.go:1782 +0x2cf
cmd/compile/internal/gc.compile(0xc82018b9e0)
        /usr/lib/google-golang/src/cmd/compile/internal/gc/pgen.go:541 +0xdf2
cmd/compile/internal/gc.funccompile(0xc82018b9e0)
        /usr/lib/google-golang/src/cmd/compile/internal/gc/dcl.go:1450 +0x1c0
cmd/compile/internal/gc.Main()
        /usr/lib/google-golang/src/cmd/compile/internal/gc/lex.go:472 +0x2116
cmd/compile/internal/amd64.Main()
        /usr/lib/google-golang/src/cmd/compile/internal/amd64/galign.go:127 +0x58d
main.main()
        /usr/lib/google-golang/src/cmd/compile/main.go:32 +0x395
</code></pre></div>