mirror of
https://github.com/golang/go.git
synced 2025-05-27 18:31:35 +00: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:
parent
67ac8a3b22
commit
a5cffb6182
@ -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)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user