diff options
author | Ian Lance Taylor <iant@golang.org> | 2020-04-13 17:47:47 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2020-04-14 18:59:37 +0000 |
commit | 33ff63da4ec9cd456cab65b034b80a2fde4ebdea (patch) | |
tree | d1b730bbe58d90a700bb93cade0ba99bfe7c24cf /misc | |
parent | cdaf8b6469b3b17ce296199ed31dca2c0816bcc6 (diff) | |
download | go-33ff63da4ec9cd456cab65b034b80a2fde4ebdea.tar.gz go-33ff63da4ec9cd456cab65b034b80a2fde4ebdea.zip |
cmd/cgo: use consistent tag for a particular struct
For #31891
Fixes #38408
Change-Id: Ie7498c2cab728ae798e66e7168425e16b063520e
Reviewed-on: https://go-review.googlesource.com/c/go/+/228102
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Diffstat (limited to 'misc')
-rw-r--r-- | misc/cgo/test/testx.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/misc/cgo/test/testx.go b/misc/cgo/test/testx.go index 98c48fa383..7fbc5c64b3 100644 --- a/misc/cgo/test/testx.go +++ b/misc/cgo/test/testx.go @@ -124,6 +124,11 @@ typedef struct { } Issue31891B; void callIssue31891(void); + +typedef struct { + int i; +} Issue38408, *PIssue38408; + */ import "C" @@ -552,3 +557,8 @@ func useIssue31891B(c *C.Issue31891B) {} func test31891(t *testing.T) { C.callIssue31891() } + +// issue 38408 +// A typedef pointer can be used as the element type. +// No runtime test; just make sure it compiles. +var _ C.PIssue38408 = &C.Issue38408{i: 1} |