3 // Copyright 2009 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.
9 func foo(a []int) int {
10 return a[0] // this seems to do the wrong thing
15 if x := (*a)[0]; x != 12 {
18 if x := foo(*a); x != 12 {
19 // fails (x is incorrect)
25 uetli:~/Source/go1/test/bugs gri$ 6go bug119
28 panic on line 83 PC=0x14d6
30 mainĀ·main(23659, 0, 1, ...)
31 mainĀ·main(0x5c6b, 0x1, 0x7fff5fbff830, ...)
33 mainstart(1, 0, 1606416432, ...)
34 mainstart(0x1, 0x7fff5fbff830, 0x0, ...)
35 uetli:~/Source/go1/test/bugs gri$