Skip to content

cmd/compile: crash on pointer conversion in call to mapaccess2 #51840

@julianiewiejska

Description

@julianiewiejska

What version of Go are you using (go version)?

go version go1.18 linux/amd64

Does this issue reproduce with the latest release?

yes

What did you do?

https://go.dev/play/p/_Q4fOpnr5rn

What did you expect to see?

Code compiles and runs without errors.

What did you see instead?

Code produces error:

<autogenerated>:1: cannot use &.autotmp_19 (type *struct { netip.addr netip.uint128; netip.z *intern.Value }) as type *netip.Addr in argument to runtime.mapaccess2

Other remarks

This seems to only happen when maps.Equal is used in the method even if the method is not called. There is no error when it is called directly: https://go.dev/play/p/KlpiWS96MA-

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.release-blocker

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions