aboutsummaryrefslogtreecommitdiff
path: root/libgo/misc/cgo/testgodefs
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2020-07-27 22:27:54 -0700
committerIan Lance Taylor <iant@golang.org>2020-08-01 11:21:40 -0700
commitf75af8c1464e948b5e166cf5ab09ebf0d82fc253 (patch)
tree3ba3299859b504bdeb477727471216bd094a0191 /libgo/misc/cgo/testgodefs
parent75a23e59031fe673fc3b2e60fd1fe5f4c70ecb85 (diff)
downloadgcc-f75af8c1464e948b5e166cf5ab09ebf0d82fc253.zip
gcc-f75af8c1464e948b5e166cf5ab09ebf0d82fc253.tar.gz
gcc-f75af8c1464e948b5e166cf5ab09ebf0d82fc253.tar.bz2
libgo: update to go1.15rc1
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/245157
Diffstat (limited to 'libgo/misc/cgo/testgodefs')
-rw-r--r--libgo/misc/cgo/testgodefs/testdata/issue38649.go15
-rw-r--r--libgo/misc/cgo/testgodefs/testdata/issue39534.go12
-rw-r--r--libgo/misc/cgo/testgodefs/testdata/main.go3
-rw-r--r--libgo/misc/cgo/testgodefs/testgodefs_test.go2
4 files changed, 32 insertions, 0 deletions
diff --git a/libgo/misc/cgo/testgodefs/testdata/issue38649.go b/libgo/misc/cgo/testgodefs/testdata/issue38649.go
new file mode 100644
index 0000000..6af74d6
--- /dev/null
+++ b/libgo/misc/cgo/testgodefs/testdata/issue38649.go
@@ -0,0 +1,15 @@
+// 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.
+//
+// +build ignore
+
+package main
+
+/*
+struct Issue38649 { int x; };
+#define issue38649 struct Issue38649
+*/
+import "C"
+
+type issue38649 C.issue38649
diff --git a/libgo/misc/cgo/testgodefs/testdata/issue39534.go b/libgo/misc/cgo/testgodefs/testdata/issue39534.go
new file mode 100644
index 0000000..9899ba1
--- /dev/null
+++ b/libgo/misc/cgo/testgodefs/testdata/issue39534.go
@@ -0,0 +1,12 @@
+// 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.
+//
+// +build ignore
+
+package main
+
+// enum { ENUMVAL = 0x1 };
+import "C"
+
+const ENUMVAL = C.ENUMVAL
diff --git a/libgo/misc/cgo/testgodefs/testdata/main.go b/libgo/misc/cgo/testgodefs/testdata/main.go
index ef45b95..2e1ad33 100644
--- a/libgo/misc/cgo/testgodefs/testdata/main.go
+++ b/libgo/misc/cgo/testgodefs/testdata/main.go
@@ -19,5 +19,8 @@ var v6 = B{}
// Test that S is fully defined
var v7 = S{}
+// Test that #define'd type is fully defined
+var _ = issue38649{X: 0}
+
func main() {
}
diff --git a/libgo/misc/cgo/testgodefs/testgodefs_test.go b/libgo/misc/cgo/testgodefs/testgodefs_test.go
index 438d23d..e4085f9 100644
--- a/libgo/misc/cgo/testgodefs/testgodefs_test.go
+++ b/libgo/misc/cgo/testgodefs/testgodefs_test.go
@@ -23,6 +23,8 @@ var filePrefixes = []string{
"fieldtypedef",
"issue37479",
"issue37621",
+ "issue38649",
+ "issue39534",
}
func TestGoDefs(t *testing.T) {