aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/gc/testdata
diff options
context:
space:
mode:
authorCherry Zhang <cherryyz@google.com>2018-08-17 11:12:43 -0400
committerCherry Zhang <cherryyz@google.com>2018-08-28 19:23:26 +0000
commitcb7f9ec4b71e81760fa36ebff60a7e41a07df238 (patch)
tree4942258694443dfb8635a93524bf67e479269ecd /src/cmd/compile/internal/gc/testdata
parentc7271c0c258634982ac4e18cdac287fcc43f93e1 (diff)
downloadgo-cb7f9ec4b71e81760fa36ebff60a7e41a07df238.tar.xz
cmd/compile: add a test for reproducible build with anonymous interfaces
Duplicated anonymous interfaces caused nondeterministic build. The fix is CL 129515. This CL adds a test. Updates #27013. Change-Id: I6b7e1bbfc943c22e8e6f32c145f7aebb567cef15 Reviewed-on: https://go-review.googlesource.com/129680 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/gc/testdata')
-rw-r--r--src/cmd/compile/internal/gc/testdata/reproducible/issue27013.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/gc/testdata/reproducible/issue27013.go b/src/cmd/compile/internal/gc/testdata/reproducible/issue27013.go
new file mode 100644
index 0000000000..817f4a640e
--- /dev/null
+++ b/src/cmd/compile/internal/gc/testdata/reproducible/issue27013.go
@@ -0,0 +1,15 @@
+// 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.
+
+package p
+
+func A(arg interface{}) {
+ _ = arg.(interface{ Func() int32 })
+ _ = arg.(interface{ Func() int32 })
+ _ = arg.(interface{ Func() int32 })
+ _ = arg.(interface{ Func() int32 })
+ _ = arg.(interface{ Func() int32 })
+ _ = arg.(interface{ Func() int32 })
+ _ = arg.(interface{ Func() int32 })
+}