blob: 9be687a7bb4004aa22dde076b224d2d2a5bb240b [file] [log] [blame]
Robert Griesemer24b39952008-09-11 17:11:16 -07001// $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
7package main
8
Russ Cox839a6842009-01-20 14:40:40 -08009type A []int;
Robert Griesemer24b39952008-09-11 17:11:16 -070010
11func main() {
Russ Coxbe2edb52009-03-03 08:39:12 -080012 a := &A{0};
13 b := &A{0, 1};
Russ Cox1a319892009-09-14 21:03:53 -070014 _, _ = a, b;
Robert Griesemer24b39952008-09-11 17:11:16 -070015}
16
17/*
18uetli:~/Source/go1/test/bugs gri$ 6g bug096.go && 6l bug096.6 && 6.out
19Trace/BPT trap
Russ Cox839a6842009-01-20 14:40:40 -080020uetli:~/Source/go1/test/bugs gri$
Robert Griesemer24b39952008-09-11 17:11:16 -070021*/
22
23/*
24It appears that the first assignment changes the size of A from open
25into a fixed array.
26*/