]> Cypherpunks repositories - gostls13.git/commitdiff
test: add extra test case for issue 7590
authorChris Manghane <cmang@golang.org>
Thu, 20 Mar 2014 18:46:45 +0000 (11:46 -0700)
committerChris Manghane <cmang@golang.org>
Thu, 20 Mar 2014 18:46:45 +0000 (11:46 -0700)
LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/78040043

test/fixedbugs/issue7590.go [new file with mode: 0644]

diff --git a/test/fixedbugs/issue7590.go b/test/fixedbugs/issue7590.go
new file mode 100644 (file)
index 0000000..e283832
--- /dev/null
@@ -0,0 +1,21 @@
+// compile
+
+// 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.
+
+// Issue 7590: gccgo incorrectly traverses nested composite literals.
+
+package p
+
+type S struct {
+       F int
+}
+
+var M = map[string]S{
+       "a": { F: 1 },
+}
+
+var P = M["a"]
+
+var F = P.F