Skip to content

cmd/compile: type..eq function not generated #23546

@cherrymui

Description

@cherrymui

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

tip (e72e69a)

Does this issue reproduce with the latest release?

Yes, reproducible with Go 1.9, but not with Go 1.8.

What did you do?

https://play.golang.org/p/YoPVe0Td6KL

package main

func main() {
	a := f()
	println(a == f())
}

func f() [2]interface{} {
	var out [2]interface{}
	return out
}

This code does not build with Go tip:

$ go run x2.go 
# command-line-arguments
type..eq.[2]interface {}: call to external function
main.main: relocation target type..eq.[2]interface {} not defined
main.main: undefined: "type..eq.[2]interface {}"

It builds with Go 1.8 and gccgo.

$ go1.8 run x2.go 
true
$ go run -compiler=gccgo x2.go
true

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions