1// run 2 3// Copyright 2018 The Go Authors. All rights reserved. 4// Use of this source code is governed by a BSD-style 5// license that can be found in the LICENSE file. 6 7// Issue 23545: gccgo didn't lower array comparison to 8// proper equality function in some case. 9 10package main 11 12func main() { 13 if a := Get(); a != dummyID(1234) { 14 panic("FAIL") 15 } 16} 17 18func dummyID(x int) [Size]interface{} { 19 var out [Size]interface{} 20 out[0] = x 21 return out 22} 23 24const Size = 32 25 26type OutputID [Size]interface{} 27 28//go:noinline 29func Get() OutputID { 30 return dummyID(1234) 31} 32