mirror of
https://github.com/golang/go
synced 2024-11-14 23:20:27 -07:00
841d865a56
My previous fix for issue 23179 was incomplete; it turns out that if an unnamed parameter is below a specific size threshold, it gets register-promoted away by the compiler (hence not encountered during some parts of DWARF inline info processing), but if it is sufficiently large, it is allocated to the stack as a named variable and treated as a regular parameter by DWARF generation. Interestingly, something in the ppc64le build of k8s causes an unnamed parameter to be retained (where on amd64 it is deleted), meaning that this wasn't caught in my amd64 testing. The fix is to insure that "_" params are treated in the same way that "~r%d" return temps are when matching up post-optimization inlined routine params with pre-inlining declarations. I've also updated the test case to include a "_" parameter with a very large size, which also triggers the bug on amd64. Fixes #23179. Change-Id: I961c84cc7a873ad3f8f91db098a5e13896c4856e Reviewed-on: https://go-review.googlesource.com/84975 Run-TryBot: Than McIntosh <thanm@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Cherry Zhang <cherryyz@google.com> Reviewed-by: Heschi Kreinick <heschi@google.com>
14 lines
262 B
Go
14 lines
262 B
Go
// 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.
|
|
|
|
package a
|
|
|
|
type Large struct {
|
|
x [256]int
|
|
}
|
|
|
|
func F(x int, _ int, _ bool, _ Large) int {
|
|
return x
|
|
}
|