1
0
mirror of https://github.com/golang/go synced 2024-10-05 16:31:21 -06:00

[dev.ssa] cmd/compile/internal/ssa: allocate complex zero in the entry block

Fixes build.  There may be no current block.

Change-Id: I0da8bab133dc207124556927698e7cd682e64ef5
Reviewed-on: https://go-review.googlesource.com/13989
Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
Keith Randall 2015-08-28 13:52:26 -07:00
parent 67ac8a3b22
commit a5cffb6182

View File

@ -1681,10 +1681,10 @@ func (s *state) zeroVal(t *Type) *ssa.Value {
switch t.Size() {
case 8:
z := s.constFloat32(Types[TFLOAT32], 0)
return s.newValue2(ssa.OpComplexMake, t, z, z)
return s.entryNewValue2(ssa.OpComplexMake, t, z, z)
case 16:
z := s.constFloat64(Types[TFLOAT64], 0)
return s.newValue2(ssa.OpComplexMake, t, z, z)
return s.entryNewValue2(ssa.OpComplexMake, t, z, z)
default:
s.Fatalf("bad sized complex type %s", t)
}