diff options
| author | Keith Randall <khr@golang.org> | 2025-04-05 08:34:12 -0700 |
|---|---|---|
| committer | Keith Randall <khr@golang.org> | 2025-04-06 19:11:43 -0700 |
| commit | 16dbd2be3969f4658ced59ddb89871d9f00cf3a5 (patch) | |
| tree | 686d7d006ca2270bcdf95d9ea00f9fcbd6ae029b /test | |
| parent | 6fd9ee3da9dc5570f66735e835cac2d66a0f6244 (diff) | |
| download | go-16dbd2be3969f4658ced59ddb89871d9f00cf3a5.tar.xz | |
cmd/compile: be more conservative about arm64 insns that can take zero register
It's really only needed for stores and store-like instructions
(atomic exchange, compare-and-swap, ...).
Fixes #73180
Change-Id: I8ecd833a301355adf0fa4bff43250091640c6226
Reviewed-on: https://go-review.googlesource.com/c/go/+/663155
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
Diffstat (limited to 'test')
| -rw-r--r-- | test/fixedbugs/issue73180.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/fixedbugs/issue73180.go b/test/fixedbugs/issue73180.go new file mode 100644 index 0000000000..421f42f8d6 --- /dev/null +++ b/test/fixedbugs/issue73180.go @@ -0,0 +1,15 @@ +// build + +// Copyright 2025 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. + +package p + +func F(a, b map[float32]int) int { + var st *struct { + n int + f float32 + } + return a[0] + b[st.f] +} |
