public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-5729] Go testsuite: update new tests to version in source repo
@ 2020-12-03 20:08 Ian Lance Taylor
  0 siblings, 0 replies; only message in thread
From: Ian Lance Taylor @ 2020-12-03 20:08 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:3089f5feef36810c625b5813370a97b4ecc841f8

commit r11-5729-g3089f5feef36810c625b5813370a97b4ecc841f8
Author: Ian Lance Taylor <iant@golang.org>
Date:   Thu Dec 3 12:07:04 2020 -0800

    Go testsuite: update new tests to version in source repo

Diff:
---
 gcc/testsuite/go.test/test/alias2.go               | 10 ++++-----
 gcc/testsuite/go.test/test/fixedbugs/bug487.go     |  2 +-
 .../go.test/test/fixedbugs/bug488.dir/a.go         |  2 +-
 .../go.test/test/fixedbugs/bug488.dir/b.go         |  2 +-
 gcc/testsuite/go.test/test/fixedbugs/bug488.go     |  2 +-
 .../go.test/test/fixedbugs/bug489.dir/a.go         |  9 --------
 .../go.test/test/fixedbugs/bug489.dir/b.go         |  9 --------
 .../go.test/test/fixedbugs/bug489.dir/c.go         |  9 --------
 gcc/testsuite/go.test/test/fixedbugs/bug489.go     | 24 +++++++++++++++-------
 gcc/testsuite/go.test/test/fixedbugs/bug497.go     |  3 ++-
 .../go.test/test/fixedbugs/bug506.dir/a.go         |  2 +-
 .../go.test/test/fixedbugs/bug506.dir/main.go      |  2 +-
 gcc/testsuite/go.test/test/fixedbugs/bug506.go     |  2 +-
 .../go.test/test/fixedbugs/bug507.dir/a.go         |  2 +-
 .../go.test/test/fixedbugs/bug507.dir/b.go         |  2 +-
 .../go.test/test/fixedbugs/bug507.dir/c.go         |  2 +-
 gcc/testsuite/go.test/test/fixedbugs/bug507.go     |  2 +-
 .../go.test/test/fixedbugs/gcc67968.dir/a.go       |  4 ++++
 .../go.test/test/fixedbugs/gcc67968.dir/b.go       |  4 ++++
 gcc/testsuite/go.test/test/fixedbugs/issue23188.go |  4 ++--
 gcc/testsuite/go.test/test/fixedbugs/issue26340.go |  2 +-
 .../go.test/test/fixedbugs/issue35739.dir/a.go     |  1 -
 gcc/testsuite/go.test/test/fixedbugs/issue6977.go  |  8 ++++----
 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 7ea1b2908dd..1c141ac490c 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 eb1ad5e571a..e60af6c8e23 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 94eaf7f1ea8..fc494207a17 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 21b4c5b541a..f93328c8da4 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 63a601ed934..3912debac9c 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 21b4c5b541a..00000000000
--- 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 63eab86999e..00000000000
--- 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 d5588013755..00000000000
--- 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 bf5e2cdbd35..34250cd8795 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 661cfacd791..7081b1cb356 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 2729b81ac68..8e8a2005810 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 f54c95d3203..1b60e40d8d0 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 3ca09ad0ecc..7c8ccc6ec7e 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 59d494281d0..0929adcfb31 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 6e4196412ff..bddce2dd839 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 23846ed88a7..e67f0fd74e8 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 48547b09be7..2d7aa597324 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 b557b2f1614..9f51a7a8bc5 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 4362b441260..41b62d20880 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 af005656d27..c22434069c4 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 cbacd84f489..f973ce2237e 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 88596a571c0..b79503e9961 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 ba48cefa955..4525e406b84 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"


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-12-03 20:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-03 20:08 [gcc r11-5729] Go testsuite: update new tests to version in source repo Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).