5 // Copyright 2021 The Go Authors. All rights reserved.
6 // Use of this source code is governed by a BSD-style
7 // license that can be found in the LICENSE file.
9 // wasm is excluded because the compiler chatter about register abi pragma ends up
10 // on stdout, and causes the expected output to not match.
22 func F(a, b, c, d, e, f *int) {
24 sink += *a // *a == 6 after swapping in G
29 func G(a, b, c, d, e, f *int) {
30 var scratch [1000 * 100]int
31 scratch[*a] = *f // scratch[6] = 1
32 fmt.Println(*a, *b, *c, *d, *e, *f) // Forces it to spill b
33 sink = scratch[*b+1] // scratch[5+1] == 1
40 a, b, c, d, e, f := 1, 2, 3, 4, 5, 6
41 F(&a, &b, &c, &d, &e, &f)
42 fmt.Println(a, b, c, d, e, f)