1 // Copyright 2015 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
5 // Issue 11925. Structs with zero-length trailing fields are now
6 // padded by the Go compiler.
30 func test11925(t
*testing
.T
) {
31 if C
.sizeof_struct_a11925
!= unsafe
.Sizeof(C
.struct_a11925
{}) {
32 t
.Errorf("size of a changed: C %d, Go %d", C
.sizeof_struct_a11925
, unsafe
.Sizeof(C
.struct_a11925
{}))
34 if C
.sizeof_struct_b11925
!= unsafe
.Sizeof(C
.struct_b11925
{}) {
35 t
.Errorf("size of b changed: C %d, Go %d", C
.sizeof_struct_b11925
, unsafe
.Sizeof(C
.struct_b11925
{}))