1
0
mirror of https://github.com/golang/go synced 2024-09-23 15:30:17 -06:00

test: add some tests that gccgo failed to handle correctly

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5671090
This commit is contained in:
Ian Lance Taylor 2012-02-17 17:52:05 -08:00
parent 793f6f3cc3
commit 7737e19b15
4 changed files with 59 additions and 0 deletions

17
test/fixedbugs/bug419.go Normal file
View File

@ -0,0 +1,17 @@
// compile
// Copyright 2012 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.
// Issue 1811.
// gccgo failed to compile this.
package p
type E interface{}
type I interface {
E
E
}

14
test/fixedbugs/bug420.go Normal file
View File

@ -0,0 +1,14 @@
// compile
// Copyright 2012 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.
// Issue 1757.
// gccgo failed to compile this.
package main
func main() {
(_) = 0
}

17
test/fixedbugs/bug421.go Normal file
View File

@ -0,0 +1,17 @@
// errorcheck
// Copyright 2012 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.
// Issue 1927.
// gccgo failed to issue the first error below.
package main
func main() {
println(int(1) == uint(1)) // ERROR "types"
var x int = 1
var y uint = 1
println(x == y) // ERROR "types"
}

11
test/fixedbugs/bug422.go Normal file
View File

@ -0,0 +1,11 @@
// compile
// Copyright 2012 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.
// gccgo crashed compiling this file.
package p
var V = "a" > "b"