From 73df946d56c74384511a194dd01dbe099584fd1a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 15:14:23 +0200 Subject: Adding upstream version 1.16.10. Signed-off-by: Daniel Baumann --- misc/cgo/test/testdata/issue9510a/a.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 misc/cgo/test/testdata/issue9510a/a.go (limited to 'misc/cgo/test/testdata/issue9510a') diff --git a/misc/cgo/test/testdata/issue9510a/a.go b/misc/cgo/test/testdata/issue9510a/a.go new file mode 100644 index 0000000..1a5224b --- /dev/null +++ b/misc/cgo/test/testdata/issue9510a/a.go @@ -0,0 +1,15 @@ +package issue9510a + +/* +static double csquare(double a, double b) { + __complex__ double d; + __real__ d = a; + __imag__ d = b; + return __real__ (d * d); +} +*/ +import "C" + +func F(a, b float64) float64 { + return float64(C.csquare(C.double(a), C.double(b))) +} -- cgit v1.2.3