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