Source file test/fixedbugs/bug409.go
1 // run 2 3 // Copyright 2012 The Go Authors. All rights reserved. 4 // Use of this source code is governed by a BSD-style 5 // license that can be found in the LICENSE file. 6 7 // Multiple inlined calls to a function that causes 8 // redundant address loads. 9 10 package main 11 12 func F(v [2]float64) [2]float64 { 13 return [2]float64{v[0], v[1]} 14 } 15 16 func main() { 17 a := F([2]float64{1, 2}) 18 b := F([2]float64{3, 4}) 19 println(a[0], a[1], b[0], b[1]) 20 } 21