From: Ian Lance Taylor Date: Tue, 4 Jun 2019 02:35:40 +0000 (-0700) Subject: misc/cgo/test: add test for issue 31093 X-Git-Tag: go1.13beta1~147 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=5f509148b13f196b12109d03809691cd1ed40284;p=gostls13.git misc/cgo/test: add test for issue 31093 Updates #31093 Change-Id: I7962aaca0b012de01768b7b42dc2283d5845eeea Reviewed-on: https://go-review.googlesource.com/c/go/+/180377 Run-TryBot: Ian Lance Taylor TryBot-Result: Gobot Gobot Reviewed-by: Dmitri Shuralyov --- diff --git a/misc/cgo/test/test.go b/misc/cgo/test/test.go index 88180bd70e..cc940da211 100644 --- a/misc/cgo/test/test.go +++ b/misc/cgo/test/test.go @@ -849,6 +849,9 @@ static int f29748(S29748 *p) { return 0; } static void issue29781F(char **p, int n) {} #define ISSUE29781C 0 +// issue 31093 +static uint16_t issue31093F(uint16_t v) { return v; } + */ import "C" @@ -2073,3 +2076,10 @@ func test30065(t *testing.T) { t.Errorf("&d[0] failed: got %c, want %c", d[0], 'c') } } + +// issue 31093 +// No runtime test; just make sure it compiles. + +func Issue31093() { + C.issue31093F(C.ushort(0)) +}