aboutsummaryrefslogtreecommitdiff
path: root/libgo/misc/cgo/test/issue29748.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/misc/cgo/test/issue29748.go')
-rw-r--r--libgo/misc/cgo/test/issue29748.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/libgo/misc/cgo/test/issue29748.go b/libgo/misc/cgo/test/issue29748.go
new file mode 100644
index 0000000..8229b3b
--- /dev/null
+++ b/libgo/misc/cgo/test/issue29748.go
@@ -0,0 +1,22 @@
+// Copyright 2019 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.
+
+// Error handling a struct initializer that requires pointer checking.
+// Compilation test only, nothing to run.
+
+package cgotest
+
+// typedef struct { char **p; } S29748;
+// static int f29748(S29748 *p) { return 0; }
+import "C"
+
+var Vissue29748 = C.f29748(&C.S29748{
+ nil,
+})
+
+func Fissue299748() {
+ C.f29748(&C.S29748{
+ nil,
+ })
+}