]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.ssa] cmd/compile/ssa: fix string compilation
authorJosh Bleecher Snyder <josharian@gmail.com>
Tue, 16 Jun 2015 23:16:23 +0000 (16:16 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Tue, 16 Jun 2015 23:38:59 +0000 (23:38 +0000)
Compilation of f_ssa was broken by CL 10929.

This CL does not include tests because
I have a work in progress CL that will catch
this and much more.

package p

func f_ssa() string {
return "ABC"
}

Change-Id: I0ce0e905e4d30ec206cce808da406b9b7f0f38e9
Reviewed-on: https://go-review.googlesource.com/11136
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/gc/ssa.go

index 3e898bb3a7b0a7b2f87724531c6c9606a986f136..2f116464d42f1a320d587ab89ed1e63a0348d559 100644 (file)
@@ -478,7 +478,7 @@ func (s *state) assign(op uint8, left *Node, right *Node) {
                t := left.Type
                switch {
                case t.IsString():
-                       val = s.entryNewValue0(ssa.OpConst, left.Type)
+                       val = s.entryNewValue0A(ssa.OpConst, left.Type, "")
                case t.IsInteger():
                        val = s.entryNewValue0(ssa.OpConst, left.Type)
                case t.IsBoolean():