mirror of
https://github.com/golang/go
synced 2024-11-05 18:36:08 +00:00
test: add test that gccgo failed to compile
Gccgo failed to create the type descriptor for the type used to allocate the nil value passed to append as the second argument when append is called with only one argument. Calling append with only one argument is unusual but obviously should not cause a compiler crash. Change-Id: I530821847dfd68f0302de6ca6a84dfbc79653935 Reviewed-on: https://go-review.googlesource.com/1692 Reviewed-by: Minux Ma <minux@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
1b0b0db6fb
commit
60ea2c594b
1 changed files with 15 additions and 0 deletions
15
test/fixedbugs/bug493.go
Normal file
15
test/fixedbugs/bug493.go
Normal file
|
@ -0,0 +1,15 @@
|
|||
// compile
|
||||
|
||||
// Copyright 2014 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.
|
||||
|
||||
// Test case that gccgo failed to compile.
|
||||
|
||||
package p
|
||||
|
||||
func F() []string {
|
||||
return []string{""}
|
||||
}
|
||||
|
||||
var V = append(F())
|
Loading…
Reference in a new issue