]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: "abc"[1] is not an ideal constant
authorAnthony Canino <anthony.canino1@gmail.com>
Sat, 10 Oct 2015 19:24:34 +0000 (15:24 -0400)
committerRuss Cox <rsc@golang.org>
Thu, 13 Oct 2016 17:41:04 +0000 (17:41 +0000)
commit26c7b4fb1e0553e8f9abe5fdd9008bb1f5bd3228
tree727a1f4d8c141c7645df8197424ade67a21ba025
parent0da30d5cbdd092499fe199c212f8799fd0cc676e
cmd/compile: "abc"[1] is not an ideal constant

"abc"[1] is not like 'b', in that -"abc"[1] is uint8 math, not ideal constant math.
Delay the constantification until after ideal constant folding is over.

Fixes #11370.

Change-Id: Iba2fc00ca2455959e7bab8f4b8b4aac14b1f9858
Reviewed-on: https://go-review.googlesource.com/15740
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/compile/internal/gc/ssa.go
src/cmd/compile/internal/gc/walk.go
test/fixedbugs/issue11370.go [new file with mode: 0644]