summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2013-10-09 11:08:22 -0400
committerRuss Cox <rsc@golang.org>2013-10-09 11:08:22 -0400
commitc48bfe11a866924413af8c346f9f588e9f0890eb (patch)
tree492ba2b6fdfb6990a2427a75c2a39a82af206148 /misc
parentc6235b2c77dcd692aafefce5f9d08b81298e64d5 (diff)
downloadgo-c48bfe11a866924413af8c346f9f588e9f0890eb.tar.gz
debug/dwarf: handle surprising clang encoding
Fixes a bug in cgo on OS X using clang. See golang.org/issue/6472 for details. Fixes issue 6472. R=golang-dev, iant CC=golang-dev https://codereview.appspot.com/14575043
Diffstat (limited to 'misc')
-rw-r--r--misc/cgo/test/issue6472.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/misc/cgo/test/issue6472.go b/misc/cgo/test/issue6472.go
new file mode 100644
index 000000000..cd94cac37
--- /dev/null
+++ b/misc/cgo/test/issue6472.go
@@ -0,0 +1,22 @@
+// Copyright 2013 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 cgotest
+
+/*
+typedef struct
+{
+ struct
+ {
+ int x;
+ } y[16];
+} z;
+*/
+import "C"
+
+func test6472() {
+ // nothing to run, just make sure this compiles
+ s := new(C.z)
+ println(s.y[0].x)
+}