aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2020-12-03 12:07:04 -0800
committerIan Lance Taylor <iant@golang.org>2020-12-03 12:08:05 -0800
commit3089f5feef36810c625b5813370a97b4ecc841f8 (patch)
tree582e5d7b377b6e973666a71960b28a7d11d72b07
parent9f1a6501994a2d18ec4fe2a6664637f48021b210 (diff)
downloadgcc-3089f5feef36810c625b5813370a97b4ecc841f8.zip
gcc-3089f5feef36810c625b5813370a97b4ecc841f8.tar.gz
gcc-3089f5feef36810c625b5813370a97b4ecc841f8.tar.bz2
Go testsuite: update new tests to version in source repo
-rw-r--r--gcc/testsuite/go.test/test/alias2.go10
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug487.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug488.dir/a.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug488.dir/b.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug488.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug489.dir/a.go9
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug489.dir/b.go9
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug489.dir/c.go9
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug489.go24
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug497.go3
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug506.dir/a.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug506.dir/main.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug506.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug507.dir/a.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug507.dir/b.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug507.dir/c.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug507.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/gcc67968.dir/a.go4
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/gcc67968.dir/b.go4
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue23188.go4
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue26340.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue35739.dir/a.go1
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue6977.go8
23 files changed, 50 insertions, 59 deletions
diff --git a/gcc/testsuite/go.test/test/alias2.go b/gcc/testsuite/go.test/test/alias2.go
index 7ea1b29..1c141ac 100644
--- a/gcc/testsuite/go.test/test/alias2.go
+++ b/gcc/testsuite/go.test/test/alias2.go
@@ -46,8 +46,8 @@ var _ A0 = T0{}
var _ T0 = A0{}
// But aliases and original types cannot be used with new types based on them.
-var _ N0 = T0{} // ERROR "cannot use T0 literal \(type T0\) as type N0 in assignment|incompatible type"
-var _ N0 = A0{} // ERROR "cannot use T0 literal \(type T0\) as type N0 in assignment|incompatible type"
+var _ N0 = T0{} // ERROR "cannot use T0{} \(type T0\) as type N0 in assignment|incompatible type"
+var _ N0 = A0{} // ERROR "cannot use T0{} \(type T0\) as type N0 in assignment|incompatible type"
var _ A5 = Value{}
@@ -82,10 +82,10 @@ func _() {
var _ A0 = T0{}
var _ T0 = A0{}
- var _ N0 = T0{} // ERROR "cannot use T0 literal \(type T0\) as type N0 in assignment|incompatible type"
- var _ N0 = A0{} // ERROR "cannot use T0 literal \(type T0\) as type N0 in assignment|incompatible type"
+ var _ N0 = T0{} // ERROR "cannot use T0{} \(type T0\) as type N0 in assignment|incompatible type"
+ var _ N0 = A0{} // ERROR "cannot use T0{} \(type T0\) as type N0 in assignment|incompatible type"
- var _ A5 = Value{} // ERROR "cannot use reflect\.Value literal \(type reflect.Value\) as type A5 in assignment|incompatible type"
+ var _ A5 = Value{} // ERROR "cannot use reflect\.Value{} \(type reflect.Value\) as type A5 in assignment|incompatible type"
}
// Invalid type alias declarations.
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug487.go b/gcc/testsuite/go.test/test/fixedbugs/bug487.go
index eb1ad5e..e60af6c 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug487.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug487.go
@@ -1,6 +1,6 @@
// errorcheck
-// Copyright 2014 The Go Authors. All rights reserved.
+// 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.
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug488.dir/a.go b/gcc/testsuite/go.test/test/fixedbugs/bug488.dir/a.go
index 94eaf7f..fc49420 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug488.dir/a.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug488.dir/a.go
@@ -1,4 +1,4 @@
-// Copyright 2014 The Go Authors. All rights reserved.
+// 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.
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug488.dir/b.go b/gcc/testsuite/go.test/test/fixedbugs/bug488.dir/b.go
index 21b4c5b..f93328c 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug488.dir/b.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug488.dir/b.go
@@ -1,4 +1,4 @@
-// Copyright 2014 The Go Authors. All rights reserved.
+// 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.
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug488.go b/gcc/testsuite/go.test/test/fixedbugs/bug488.go
index 63a601e..3912deb 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug488.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug488.go
@@ -1,6 +1,6 @@
// errorcheckdir
-// Copyright 2014 The Go Authors. All rights reserved.
+// 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.
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug489.dir/a.go b/gcc/testsuite/go.test/test/fixedbugs/bug489.dir/a.go
deleted file mode 100644
index 21b4c5b..0000000
--- a/gcc/testsuite/go.test/test/fixedbugs/bug489.dir/a.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// 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.
-
-package a
-
-import . "fmt"
-
-var p1 = Print
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug489.dir/b.go b/gcc/testsuite/go.test/test/fixedbugs/bug489.dir/b.go
deleted file mode 100644
index 63eab86..0000000
--- a/gcc/testsuite/go.test/test/fixedbugs/bug489.dir/b.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// 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.
-
-package a
-
-import "fmt"
-
-var p2 = fmt.Printf
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug489.dir/c.go b/gcc/testsuite/go.test/test/fixedbugs/bug489.dir/c.go
deleted file mode 100644
index d558801..0000000
--- a/gcc/testsuite/go.test/test/fixedbugs/bug489.dir/c.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// 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.
-
-package a
-
-import . "fmt"
-
-var p3 = Println
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug489.go b/gcc/testsuite/go.test/test/fixedbugs/bug489.go
index bf5e2cd..34250cd 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug489.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug489.go
@@ -1,12 +1,22 @@
-// compiledir
+// compile
-// Copyright 2014 The Go Authors. All rights reserved.
+// 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.
-// The gccgo compiler had a bug: if one file in a package did a dot
-// import, then an earlier file in the package would incorrectly
-// resolve to the imported names rather than reporting undefined
-// errors.
+// The gccgo compiler had a bug: mentioning a function type in an
+// expression in a function literal messed up the list of variables
+// referenced in enclosing functions.
-package ignored
+package main
+
+func main() {
+ v1, v2 := 0, 0
+ f := func() {
+ a := v1
+ g := (func())(nil)
+ b := v2
+ _, _, _ = a, g, b
+ }
+ _, _, _ = v1, v2, f
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug497.go b/gcc/testsuite/go.test/test/fixedbugs/bug497.go
index 661cfac..7081b1c 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug497.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug497.go
@@ -4,7 +4,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Gccgo used to miscompile this, because of the empty struct.
+// Gccgo used to miscompile passing a global variable with a
+// zero-sized type to a function.
package main
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug506.dir/a.go b/gcc/testsuite/go.test/test/fixedbugs/bug506.dir/a.go
index 2729b81..8e8a200 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug506.dir/a.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug506.dir/a.go
@@ -1,4 +1,4 @@
-// Copyright 2017 The Go Authors. All rights reserved.
+// Copyright 2018 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.
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug506.dir/main.go b/gcc/testsuite/go.test/test/fixedbugs/bug506.dir/main.go
index f54c95d..1b60e40 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug506.dir/main.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug506.dir/main.go
@@ -1,4 +1,4 @@
-// Copyright 2017 The Go Authors. All rights reserved.
+// Copyright 2018 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.
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug506.go b/gcc/testsuite/go.test/test/fixedbugs/bug506.go
index 3ca09ad..7c8ccc6 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug506.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug506.go
@@ -1,6 +1,6 @@
// rundir
-// Copyright 2017 The Go Authors. All rights reserved.
+// Copyright 2018 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.
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug507.dir/a.go b/gcc/testsuite/go.test/test/fixedbugs/bug507.dir/a.go
index 59d4942..0929adc 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug507.dir/a.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug507.dir/a.go
@@ -1,4 +1,4 @@
-// Copyright 2019 The Go Authors. All rights reserved.
+// Copyright 2020 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.
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug507.dir/b.go b/gcc/testsuite/go.test/test/fixedbugs/bug507.dir/b.go
index 6e41964..bddce2d 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug507.dir/b.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug507.dir/b.go
@@ -1,4 +1,4 @@
-// Copyright 2019 The Go Authors. All rights reserved.
+// Copyright 2020 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.
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug507.dir/c.go b/gcc/testsuite/go.test/test/fixedbugs/bug507.dir/c.go
index 23846ed..e67f0fd 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug507.dir/c.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug507.dir/c.go
@@ -1,4 +1,4 @@
-// Copyright 2019 The Go Authors. All rights reserved.
+// Copyright 2020 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.
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug507.go b/gcc/testsuite/go.test/test/fixedbugs/bug507.go
index 48547b0..2d7aa59 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug507.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug507.go
@@ -1,6 +1,6 @@
// compiledir
-// Copyright 2019 The Go Authors. All rights reserved.
+// Copyright 2020 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.
diff --git a/gcc/testsuite/go.test/test/fixedbugs/gcc67968.dir/a.go b/gcc/testsuite/go.test/test/fixedbugs/gcc67968.dir/a.go
index b557b2f..9f51a7a 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/gcc67968.dir/a.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/gcc67968.dir/a.go
@@ -1,3 +1,7 @@
+// Copyright 2015 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 T int
diff --git a/gcc/testsuite/go.test/test/fixedbugs/gcc67968.dir/b.go b/gcc/testsuite/go.test/test/fixedbugs/gcc67968.dir/b.go
index 4362b44..41b62d2 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/gcc67968.dir/b.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/gcc67968.dir/b.go
@@ -1,3 +1,7 @@
+// Copyright 2015 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 b
import "./a"
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue23188.go b/gcc/testsuite/go.test/test/fixedbugs/issue23188.go
index af00565..c224340 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/issue23188.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue23188.go
@@ -9,7 +9,7 @@
package main
func main() {
- arr := []int{1, 2}
+ arr := []int{1, 2}
// The spec says that in an assignment statement the operands
// of all index expressions and pointer indirections on the
@@ -24,7 +24,7 @@ func main() {
// tmp3 := len(arr)
// arr = arr[:tmp3-1]
// tmp1[tmp2] = 3
- arr, arr[len(arr)-1] = arr[:len(arr)-1], 3
+ arr, arr[len(arr)-1] = arr[:len(arr)-1], 3
if len(arr) != 1 || arr[0] != 1 || arr[:2][1] != 3 {
panic(arr)
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue26340.go b/gcc/testsuite/go.test/test/fixedbugs/issue26340.go
index cbacd84..f973ce2 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/issue26340.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue26340.go
@@ -5,7 +5,7 @@
// license that can be found in the LICENSE file.
// gccgo did not permit omitting the type of a composite literal
-// element when the element type is a pointer type.
+// element when one of the middle omitted types was a pointer type.
package p
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue35739.dir/a.go b/gcc/testsuite/go.test/test/fixedbugs/issue35739.dir/a.go
index 88596a5..b79503e 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/issue35739.dir/a.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue35739.dir/a.go
@@ -10,7 +10,6 @@ func (e myError) Error() string { return string(e) }
const myErrorVal myError = "error"
-
func IsMyError(err error) bool {
return err == error(myErrorVal)
}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue6977.go b/gcc/testsuite/go.test/test/fixedbugs/issue6977.go
index ba48cef..4525e40 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/issue6977.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue6977.go
@@ -34,7 +34,7 @@ type U3 interface { M; m() }
type U4 interface { M; M; M }
type U5 interface { U1; U2; U3; U4 }
-type U6 interface { m(); m() } // ERROR "duplicate method"
-type U7 interface { M32; m() } // ERROR "duplicate method"
-type U8 interface { m(); M32 } // ERROR "duplicate method"
-type U9 interface { M32; M64 } // ERROR "duplicate method"
+type U6 interface { m(); m() } // ERROR "duplicate method .*m"
+type U7 interface { M32; m() } // ERROR "duplicate method .*m"
+type U8 interface { m(); M32 } // ERROR "duplicate method .*m"
+type U9 interface { M32; M64 } // ERROR "duplicate method .*m"