diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2019-03-18 20:27:59 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2019-03-18 20:27:59 +0000 |
commit | a8b58d84bf4fd9c925a835ba39c1c552383bc61b (patch) | |
tree | 97d68e0e70fb780b04f3171a0f53102a39c23f41 /libgo/misc/cgo | |
parent | 891cd9e3b9a89b0461fb838d38c51b6fab596337 (diff) | |
download | gcc-a8b58d84bf4fd9c925a835ba39c1c552383bc61b.zip gcc-a8b58d84bf4fd9c925a835ba39c1c552383bc61b.tar.gz gcc-a8b58d84bf4fd9c925a835ba39c1c552383bc61b.tar.bz2 |
libgo: update to Go 1.12.1
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/167749
From-SVN: r269780
Diffstat (limited to 'libgo/misc/cgo')
-rw-r--r-- | libgo/misc/cgo/test/testdata/issue30527.go | 14 | ||||
-rw-r--r-- | libgo/misc/cgo/test/testdata/issue30527/a.go | 19 | ||||
-rw-r--r-- | libgo/misc/cgo/test/testdata/issue30527/b.go | 11 |
3 files changed, 44 insertions, 0 deletions
diff --git a/libgo/misc/cgo/test/testdata/issue30527.go b/libgo/misc/cgo/test/testdata/issue30527.go new file mode 100644 index 0000000..4ea7d31 --- /dev/null +++ b/libgo/misc/cgo/test/testdata/issue30527.go @@ -0,0 +1,14 @@ +// 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. + +// Issue 30527: function call rewriting casts untyped +// constants to int because of ":=" usage. + +package cgotest + +import "cgotest/issue30527" + +func issue30527G() { + issue30527.G(nil) +} diff --git a/libgo/misc/cgo/test/testdata/issue30527/a.go b/libgo/misc/cgo/test/testdata/issue30527/a.go new file mode 100644 index 0000000..eb50147 --- /dev/null +++ b/libgo/misc/cgo/test/testdata/issue30527/a.go @@ -0,0 +1,19 @@ +// 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. + +package issue30527 + +import "math" + +/* +#include <inttypes.h> + +static void issue30527F(char **p, uint64_t mod, uint32_t unused) {} +*/ +import "C" + +func G(p **C.char) { + C.issue30527F(p, math.MaxUint64, 1) + C.issue30527F(p, 1<<64-1, Z) +} diff --git a/libgo/misc/cgo/test/testdata/issue30527/b.go b/libgo/misc/cgo/test/testdata/issue30527/b.go new file mode 100644 index 0000000..87e8255 --- /dev/null +++ b/libgo/misc/cgo/test/testdata/issue30527/b.go @@ -0,0 +1,11 @@ +// 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. + +package issue30527 + +const ( + X = 1 << iota + Y + Z +) |