mirror of
https://github.com/golang/go
synced 2024-11-23 23:10:09 -07:00
40649e6979
...because that's an illegal addressing mode. I double-checked handling of this code, and 387 is the only place where this check is missing. Fixes #22429 Change-Id: I2284fe729ea86251c6af2f04076ddf7a5e66367c Reviewed-on: https://go-review.googlesource.com/73551 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
19 lines
369 B
Go
19 lines
369 B
Go
// compile
|
|
|
|
// Copyright 2017 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
// Make sure SSA->assembly pass can handle SP as an index register.
|
|
|
|
package p
|
|
|
|
type T struct {
|
|
a,b,c,d float32
|
|
}
|
|
|
|
func f(a *[8]T, i,j,k int) float32 {
|
|
b := *a
|
|
return b[i].a + b[j].b + b[k].c
|
|
}
|