Source file
test/abi/spills4.go
1
2
3
4
5
6
7
8
9
10
11
12 package main
13
14 import "fmt"
15
16 type i5f5 struct {
17 a, b int16
18 c, d, e int32
19 r, s, t, u, v float32
20 }
21
22
23 func spills(_ *float32) {
24
25 }
26
27
28
29 func F(x i5f5) i5f5 {
30 y := x.v
31 spills(&y)
32 x.r = y
33 return x
34 }
35
36 func main() {
37 x := i5f5{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
38 y := x
39 z := F(x)
40 if (i5f5{1, 2, 3, 4, 5, 10, 7, 8, 9, 10}) != z {
41 fmt.Printf("y=%v, z=%v\n", y, z)
42 }
43 }
44
View as plain text