1 // $G $D/$F.go && $L $F.$A && ./$A.out
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.
10 type x2
struct { a
,b
,c
int; d
int; };
12 var g2
struct { a
,b
,c
int; d x2
; };
18 var s2
*struct { a
,b
,c
int; d x2
; };
19 var s3
struct { a
,b
,c
int; d x2
; };
29 if(s1
.c
!= 3) { panic(s1
.c
); }
30 if(g1
.c
!= 3) { panic(g1
.c
); }
40 if(s2
.d
.c
!= 23) { panic(s2
.d
.c
); }
41 if(g2
.d
.c
!= 23) { panic(g2
.d
.c
); }
56 if(x
!= 130) { panic(x
); }
58 // test an automatic struct
67 if(s3
.d
.c
!= 23) { panic(s3
.d
.c
); }
77 if(x
!= 119) { panic(x
); }