1
0
mirror of https://github.com/golang/go synced 2024-09-23 21:20:13 -06:00

test: new test for issue 31637

This pair of packages caused a crash in gollvm, due to a glitch in the
way the front end handles empty/non-name parameters for functions that
are inline candidates.

Updates #31637.

Change-Id: I571c0658a00974dd36025e571638c0c836a3cdfd
Reviewed-on: https://go-review.googlesource.com/c/go/+/173617
Run-TryBot: Benny Siegert <bsiegert@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Than McIntosh 2019-04-24 08:27:04 -04:00
parent 562b7c27ec
commit 57076b8e6e
3 changed files with 45 additions and 0 deletions

View File

@ -0,0 +1,15 @@
// Copyright 2019 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package a
type dO struct {
x int
}
type EDO struct{}
func (EDO) Apply(*dO) {}
var X EDO

View File

@ -0,0 +1,19 @@
// Copyright 2019 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import "./a"
type No struct {
a.EDO
}
func X() No {
return No{}
}
func main() {
X()
}

View File

@ -0,0 +1,11 @@
// compiledir
// Copyright 2019 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// This directory contains a pair of packages that triggered
// a compiler crash in gollvm (problem in handling an inlinable
// method with unnamed parameter). See issue 31637 for details.
package ignored