Robert Griesemer | 24b3995 | 2008-09-11 17:11:16 -0700 | [diff] [blame] | 1 | // $G $D/$F.go || echo BUG should compile |
| 2 | |
| 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. |
| 6 | |
| 7 | package main |
| 8 | |
Russ Cox | 839a684 | 2009-01-20 14:40:40 -0800 | [diff] [blame] | 9 | type A []int; |
Robert Griesemer | 24b3995 | 2008-09-11 17:11:16 -0700 | [diff] [blame] | 10 | |
| 11 | func main() { |
Russ Cox | be2edb5 | 2009-03-03 08:39:12 -0800 | [diff] [blame] | 12 | a := &A{0}; |
| 13 | b := &A{0, 1}; |
Russ Cox | 1a31989 | 2009-09-14 21:03:53 -0700 | [diff] [blame] | 14 | _, _ = a, b; |
Robert Griesemer | 24b3995 | 2008-09-11 17:11:16 -0700 | [diff] [blame] | 15 | } |
| 16 | |
| 17 | /* |
| 18 | uetli:~/Source/go1/test/bugs gri$ 6g bug096.go && 6l bug096.6 && 6.out |
| 19 | Trace/BPT trap |
Russ Cox | 839a684 | 2009-01-20 14:40:40 -0800 | [diff] [blame] | 20 | uetli:~/Source/go1/test/bugs gri$ |
Robert Griesemer | 24b3995 | 2008-09-11 17:11:16 -0700 | [diff] [blame] | 21 | */ |
| 22 | |
| 23 | /* |
| 24 | It appears that the first assignment changes the size of A from open |
| 25 | into a fixed array. |
| 26 | */ |