]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix ICE due to missing inline function body
authorMatthew Dempsky <mdempsky@google.com>
Wed, 11 Jul 2018 23:43:51 +0000 (16:43 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Thu, 12 Jul 2018 00:13:37 +0000 (00:13 +0000)
commitcc422e64d083b28a5f03e654970276c4bcac3677
tree49ef2f177b4ff3498b6431240496f14b0a3b4b6c
parent6b89194c28e6c4a26b8d917a8c3e158a7eb0c169
cmd/compile: fix ICE due to missing inline function body

For golang.org/cl/74110, I forgot that you can use range-based for
loops to extract key values from a map value.

This wasn't a problem for the binary format importer, because it was
more tolerant about missing inline function bodies. However, the
indexed importer is more particular about this.

We could potentially just make it more lenient like the binary
importer, but tweaking the logic here is easy enough and seems like
the preferable solution.

Fixes #26341.

Change-Id: I54564dcd0be60ea393f8a0f6954b7d3d61e96ee5
Reviewed-on: https://go-review.googlesource.com/123475
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
src/cmd/compile/internal/gc/bexport.go
test/fixedbugs/issue26341.dir/a.go [new file with mode: 0644]
test/fixedbugs/issue26341.dir/b.go [new file with mode: 0644]
test/fixedbugs/issue26341.go [new file with mode: 0644]