From 059a5ac3ebfafe5977b1e6176433c111ef8950f3 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Wed, 8 Jan 2020 17:50:52 -0800 Subject: [PATCH] test: add test that gccgo fails to compile Change-Id: I14d31bb62fd0e26a84f8781644c40918404f5f3e Reviewed-on: https://go-review.googlesource.com/c/go/+/213899 Run-TryBot: Ian Lance Taylor TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick --- test/fixedbugs/bug507.dir/a.go | 13 +++++++++++++ test/fixedbugs/bug507.dir/b.go | 9 +++++++++ test/fixedbugs/bug507.dir/c.go | 9 +++++++++ test/fixedbugs/bug507.go | 9 +++++++++ 4 files changed, 40 insertions(+) create mode 100644 test/fixedbugs/bug507.dir/a.go create mode 100644 test/fixedbugs/bug507.dir/b.go create mode 100644 test/fixedbugs/bug507.dir/c.go create mode 100644 test/fixedbugs/bug507.go diff --git a/test/fixedbugs/bug507.dir/a.go b/test/fixedbugs/bug507.dir/a.go new file mode 100644 index 0000000000..0929adcfb3 --- /dev/null +++ b/test/fixedbugs/bug507.dir/a.go @@ -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 index 0000000000..bddce2dd83 --- /dev/null +++ b/test/fixedbugs/bug507.dir/b.go @@ -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 index 0000000000..e67f0fd74e --- /dev/null +++ b/test/fixedbugs/bug507.dir/c.go @@ -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 index 0000000000..2d7aa59732 --- /dev/null +++ b/test/fixedbugs/bug507.go @@ -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 -- 2.50.0