]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: trying to linkname a method is not an ICE, just an error
authorKeith Randall <khr@golang.org>
Sun, 8 May 2022 15:32:07 +0000 (08:32 -0700)
committerGopher Robot <gobot@golang.org>
Sun, 8 May 2022 15:55:23 +0000 (15:55 +0000)
Fixes #52774

Change-Id: I853f462146d10e44a35e5a8716d41f32b6052fd5
Reviewed-on: https://go-review.googlesource.com/c/go/+/404936
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Keith Randall <khr@google.com>

src/cmd/compile/internal/ssagen/abi.go

index e14f080a85457deea7a727aa48e155319c281dc7..1e8ab54a4c9b888598e1eff24f3fd906a8948f0d 100644 (file)
@@ -281,7 +281,8 @@ func makeABIWrapper(f *ir.Func, wrapperABI obj.ABI) {
        // below to handle the receiver. Panic if we see this scenario.
        ft := f.Nname.Type()
        if ft.NumRecvs() != 0 {
-               panic("makeABIWrapper support for wrapping methods not implemented")
+               base.ErrorfAt(f.Pos(), "makeABIWrapper support for wrapping methods not implemented")
+               return
        }
 
        // Reuse f's types.Sym to create a new ODCLFUNC/function.