cmd/compile: add OSLICELIT

Does not pass toolstash -cmp due to changed export data,
but the cmd/go binary (which doesn't contain export data)
is bit-for-bit identical.

Change-Id: I6b12f9de18cf7da528e9207dccbf8f08c969f142
Reviewed-on: https://go-review.googlesource.com/26753
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
Josh Bleecher Snyder 2016-06-19 07:20:28 -07:00
parent 41e1c42028
commit 49cce1a62e
14 changed files with 114 additions and 128 deletions

View file

@ -1397,7 +1397,7 @@ func safeexpr(n *Node, init *Nodes) *Node {
a = walkexpr(a, init)
return a
case OSTRUCTLIT, OARRAYLIT:
case OSTRUCTLIT, OARRAYLIT, OSLICELIT:
if isStaticCompositeLiteral(n) {
return n
}