diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 13:16:40 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 13:16:40 +0000 |
commit | 47ab3d4a42e9ab51c465c4322d2ec233f6324e6b (patch) | |
tree | a61a0ffd83f4a3def4b36e5c8e99630c559aa723 /test/abi/fuzz_trailing_zero_field.go | |
parent | Initial commit. (diff) | |
download | golang-1.18-47ab3d4a42e9ab51c465c4322d2ec233f6324e6b.tar.xz golang-1.18-47ab3d4a42e9ab51c465c4322d2ec233f6324e6b.zip |
Adding upstream version 1.18.10.upstream/1.18.10upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/abi/fuzz_trailing_zero_field.go')
-rw-r--r-- | test/abi/fuzz_trailing_zero_field.go | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/test/abi/fuzz_trailing_zero_field.go b/test/abi/fuzz_trailing_zero_field.go new file mode 100644 index 0000000..ae7ad32 --- /dev/null +++ b/test/abi/fuzz_trailing_zero_field.go @@ -0,0 +1,39 @@ +// run + +// Copyright 2021 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 main + +var p0exp = S1{ + F1: complex(float64(2.3640607624715027), float64(-0.2717825524109192)), + F2: S2{F1: 9}, + F3: 103050709, +} + +type S1 struct { + F1 complex128 + F2 S2 + F3 uint64 +} + +type S2 struct { + F1 uint64 + F2 empty +} + +type empty struct { +} + +//go:noinline +//go:registerparams +func callee(p0 S1) { + if p0 != p0exp { + panic("bad p0") + } +} + +func main() { + callee(p0exp) +} |