diff options
author | Matthew Dempsky <mdempsky@google.com> | 2021-07-20 12:46:13 -0700 |
---|---|---|
committer | Matthew Dempsky <mdempsky@google.com> | 2021-07-20 14:34:09 -0700 |
commit | e4994e71fb1809d8ce7df89e471586e05797e171 (patch) | |
tree | c48395ef73ff6e411de6512877e7d8ffd9a76e52 /test | |
parent | c6d3d0b0ad10926fc1952deda913d139ed608cb3 (diff) | |
parent | c8f4e6152d5f0b767a8177b7d09884cf2279d8e6 (diff) | |
download | go-e4994e71fb1809d8ce7df89e471586e05797e171.tar.gz go-e4994e71fb1809d8ce7df89e471586e05797e171.zip |
[dev.typeparams] all: merge master (c8f4e61) into dev.typeparams
Conflicts:
- src/runtime/internal/sys/zgoarch_386.go
- src/runtime/internal/sys/zgoarch_amd64.go
- src/runtime/internal/sys/zgoarch_arm.go
- src/runtime/internal/sys/zgoarch_arm64.go
- src/runtime/internal/sys/zgoarch_arm64be.go
- src/runtime/internal/sys/zgoarch_armbe.go
- src/runtime/internal/sys/zgoarch_mips.go
- src/runtime/internal/sys/zgoarch_mips64.go
- src/runtime/internal/sys/zgoarch_mips64le.go
- src/runtime/internal/sys/zgoarch_mips64p32.go
- src/runtime/internal/sys/zgoarch_mips64p32le.go
- src/runtime/internal/sys/zgoarch_mipsle.go
- src/runtime/internal/sys/zgoarch_ppc.go
- src/runtime/internal/sys/zgoarch_ppc64.go
- src/runtime/internal/sys/zgoarch_ppc64le.go
- src/runtime/internal/sys/zgoarch_riscv.go
- src/runtime/internal/sys/zgoarch_riscv64.go
- src/runtime/internal/sys/zgoarch_s390.go
- src/runtime/internal/sys/zgoarch_s390x.go
- src/runtime/internal/sys/zgoarch_sparc.go
- src/runtime/internal/sys/zgoarch_sparc64.go
- src/runtime/internal/sys/zgoarch_wasm.go
On dev.typeparams, CL 328336 moved these files to internal/goarch;
whereas on master, CL 333909 reserved GOARCH=loong64. For this CL,
I resolved the conflict by simply running "go generate internal/goarch".
Merge List:
+ 2021-07-19 c8f4e6152d spec: correct example comment in Conversions from slice to array
+ 2021-07-19 1d91551b73 time: correct typo in documentation for UnixMicro
+ 2021-07-19 404127c30f cmd/compile: fix off-by-one error in traceback argument counting
+ 2021-07-19 6298cfe672 cmd/compile: fix typo in fatal message of builtinCall
+ 2021-07-19 49402bee36 cmd/{compile,link}: fix bug in map.zero handling
+ 2021-07-18 a66190ecee test/bench/go1: fix size for RegexpMatchMedium_32
+ 2021-07-18 650fc2117a text/scanner: use Go convention in Position doc comment
+ 2021-07-16 aa4e0f528e net/http: correct capitalization in cancelTimeBody comment
+ 2021-07-15 0941dbca6a testing: clarify in docs that TestMain is advanced
+ 2021-07-15 69728ead87 cmd/go: update error messages in tests to match CL 332573
+ 2021-07-15 c1cc9f9c3d cmd/compile: fix lookup package of redeclared dot import symbol
+ 2021-07-15 21a04e3335 doc/go1.17: mention GOARCH=loong64
+ 2021-07-14 2b00a54baf go/build, runtime/internal/sys: reserve GOARCH=loong64
+ 2021-07-14 60ddf42b46 cmd/go: change link in error message from /wiki to /doc.
+ 2021-07-13 d8f348a589 cmd/go: remove a duplicated word from 'go help mod graph'
+ 2021-07-12 a98589711d crypto/tls: test key type when casting
+ 2021-07-12 cfbd73ba33 doc/go1.17: editing pass over the "Compiler" section
+ 2021-07-09 ab4085ce84 runtime/pprof: call runtime.GC twice in memory profile test
Change-Id: I1490a4c7e4c560659c21a4eb67d243f35d1f908e
Diffstat (limited to 'test')
-rw-r--r-- | test/bench/go1/regexp_test.go | 2 | ||||
-rw-r--r-- | test/fixedbugs/issue47185.dir/bad/bad.go | 72 | ||||
-rw-r--r-- | test/fixedbugs/issue47185.dir/main.go | 28 | ||||
-rw-r--r-- | test/fixedbugs/issue47185.go | 11 | ||||
-rw-r--r-- | test/fixedbugs/issue47201.dir/a.go | 13 | ||||
-rw-r--r-- | test/fixedbugs/issue47201.dir/b.go | 9 | ||||
-rw-r--r-- | test/fixedbugs/issue47201.go | 7 | ||||
-rw-r--r-- | test/run.go | 1 |
8 files changed, 142 insertions, 1 deletions
diff --git a/test/bench/go1/regexp_test.go b/test/bench/go1/regexp_test.go index 3ce9f3a2c6..dd1034fde5 100644 --- a/test/bench/go1/regexp_test.go +++ b/test/bench/go1/regexp_test.go @@ -53,7 +53,7 @@ func BenchmarkRegexpMatchEasy0_32(b *testing.B) { benchmark(b, easy0, 32<<0) } func BenchmarkRegexpMatchEasy0_1K(b *testing.B) { benchmark(b, easy0, 1<<10) } func BenchmarkRegexpMatchEasy1_32(b *testing.B) { benchmark(b, easy1, 32<<0) } func BenchmarkRegexpMatchEasy1_1K(b *testing.B) { benchmark(b, easy1, 1<<10) } -func BenchmarkRegexpMatchMedium_32(b *testing.B) { benchmark(b, medium, 1<<0) } +func BenchmarkRegexpMatchMedium_32(b *testing.B) { benchmark(b, medium, 32<<0) } func BenchmarkRegexpMatchMedium_1K(b *testing.B) { benchmark(b, medium, 1<<10) } func BenchmarkRegexpMatchHard_32(b *testing.B) { benchmark(b, hard, 32<<0) } func BenchmarkRegexpMatchHard_1K(b *testing.B) { benchmark(b, hard, 1<<10) } diff --git a/test/fixedbugs/issue47185.dir/bad/bad.go b/test/fixedbugs/issue47185.dir/bad/bad.go new file mode 100644 index 0000000000..1aa4fbb909 --- /dev/null +++ b/test/fixedbugs/issue47185.dir/bad/bad.go @@ -0,0 +1,72 @@ +// Copyright 2021 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 + +// Note that the use of CGO here is solely to trigger external +// linking, since that is required to trigger that bad behavior +// in this bug. + +// #include <stdlib.h> +import "C" + +func Bad() { + m := make(map[int64]A) + a := m[0] + if len(a.B.C1.D2.E2.F1) != 0 || + len(a.B.C1.D2.E2.F2) != 0 || + len(a.B.C1.D2.E2.F3) != 0 || + len(a.B.C1.D2.E2.F4) != 0 || + len(a.B.C1.D2.E2.F5) != 0 || + len(a.B.C1.D2.E2.F6) != 0 || + len(a.B.C1.D2.E2.F7) != 0 || + len(a.B.C1.D2.E2.F8) != 0 || + len(a.B.C1.D2.E2.F9) != 0 || + len(a.B.C1.D2.E2.F10) != 0 || + len(a.B.C1.D2.E2.F11) != 0 || + len(a.B.C1.D2.E2.F16) != 0 { + panic("bad") + } + C.malloc(100) +} + +type A struct { + B +} + +type B struct { + C1 C + C2 C +} + +type C struct { + D1 D + D2 D +} + +type D struct { + E1 E + E2 E + E3 E + E4 E +} + +type E struct { + F1 string + F2 string + F3 string + F4 string + F5 string + F6 string + F7 string + F8 string + F9 string + F10 string + F11 string + F12 string + F13 string + F14 string + F15 string + F16 string +} diff --git a/test/fixedbugs/issue47185.dir/main.go b/test/fixedbugs/issue47185.dir/main.go new file mode 100644 index 0000000000..7b46e55d8b --- /dev/null +++ b/test/fixedbugs/issue47185.dir/main.go @@ -0,0 +1,28 @@ +// Copyright 2021 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 ( + bad "issue47185.dir/bad" +) + +func main() { + another() + bad.Bad() +} + +func another() L { + m := make(map[string]L) + return m[""] +} + +type L struct { + A Data + B Data +} + +type Data struct { + F1 [22][]string +} diff --git a/test/fixedbugs/issue47185.go b/test/fixedbugs/issue47185.go new file mode 100644 index 0000000000..9c921b8698 --- /dev/null +++ b/test/fixedbugs/issue47185.go @@ -0,0 +1,11 @@ +// +build cgo +// runindir + +// Copyright 2021 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. + +// Another test to verify compiler and linker handling of multiple +// competing map.zero symbol definitions. + +package ignored diff --git a/test/fixedbugs/issue47201.dir/a.go b/test/fixedbugs/issue47201.dir/a.go new file mode 100644 index 0000000000..54b7079092 --- /dev/null +++ b/test/fixedbugs/issue47201.dir/a.go @@ -0,0 +1,13 @@ +// Copyright 2021 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 ( + . "fmt" +) + +func test() { + Println("foo") +} diff --git a/test/fixedbugs/issue47201.dir/b.go b/test/fixedbugs/issue47201.dir/b.go new file mode 100644 index 0000000000..5fd0635af2 --- /dev/null +++ b/test/fixedbugs/issue47201.dir/b.go @@ -0,0 +1,9 @@ +// Copyright 2021 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 + +func Println() {} // ERROR "Println redeclared in this block" + +func main() {} diff --git a/test/fixedbugs/issue47201.go b/test/fixedbugs/issue47201.go new file mode 100644 index 0000000000..e3a470b419 --- /dev/null +++ b/test/fixedbugs/issue47201.go @@ -0,0 +1,7 @@ +// errorcheckdir + +// Copyright 2021 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 ignored diff --git a/test/run.go b/test/run.go index 3ccf1046ce..ce0d645985 100644 --- a/test/run.go +++ b/test/run.go @@ -2151,6 +2151,7 @@ var types2Failures = setOf( "fixedbugs/issue4232.go", // types2 reports (correct) extra errors "fixedbugs/issue4452.go", // types2 reports (correct) extra errors "fixedbugs/issue4510.go", // types2 reports different (but ok) line numbers + "fixedbugs/issue47201.go", // types2 spells the error message differently "fixedbugs/issue5609.go", // types2 needs a better error message "fixedbugs/issue7525b.go", // types2 reports init cycle error on different line - ok otherwise "fixedbugs/issue7525c.go", // types2 reports init cycle error on different line - ok otherwise |