]> Cypherpunks repositories - gostls13.git/commitdiff
test: add test that gccgo fails to compile
authorIan Lance Taylor <iant@golang.org>
Thu, 9 Jan 2020 01:50:52 +0000 (17:50 -0800)
committerIan Lance Taylor <iant@golang.org>
Sat, 22 Feb 2020 04:31:41 +0000 (04:31 +0000)
Change-Id: I14d31bb62fd0e26a84f8781644c40918404f5f3e
Reviewed-on: https://go-review.googlesource.com/c/go/+/213899
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
test/fixedbugs/bug507.dir/a.go [new file with mode: 0644]
test/fixedbugs/bug507.dir/b.go [new file with mode: 0644]
test/fixedbugs/bug507.dir/c.go [new file with mode: 0644]
test/fixedbugs/bug507.go [new file with mode: 0644]

diff --git a/test/fixedbugs/bug507.dir/a.go b/test/fixedbugs/bug507.dir/a.go
new file mode 100644 (file)
index 0000000..0929adc
--- /dev/null
@@ -0,0 +1,13 @@
+// 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.
+
+package a
+
+type I interface {
+       M()
+}
+
+type S struct {
+       I I
+}
diff --git a/test/fixedbugs/bug507.dir/b.go b/test/fixedbugs/bug507.dir/b.go
new file mode 100644 (file)
index 0000000..bddce2d
--- /dev/null
@@ -0,0 +1,9 @@
+// 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.
+
+package b
+
+import . "./a"
+
+var V2 I
diff --git a/test/fixedbugs/bug507.dir/c.go b/test/fixedbugs/bug507.dir/c.go
new file mode 100644 (file)
index 0000000..e67f0fd
--- /dev/null
@@ -0,0 +1,9 @@
+// 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.
+
+package b
+
+import "./a"
+
+var V1 = a.S{I: nil}
diff --git a/test/fixedbugs/bug507.go b/test/fixedbugs/bug507.go
new file mode 100644 (file)
index 0000000..2d7aa59
--- /dev/null
@@ -0,0 +1,9 @@
+// compiledir
+
+// 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.
+
+// Gccgo mishandled a combination of normal import and dot import.
+
+package ignored