iant: will this be ok in gccgo?
R=rsc
DELTA=9 (8 added, 0 deleted, 1 changed)
OCL=28059
CL=28062
xuintptr uintptr;
}
-var x allTypes
+var (
+ x allTypes;
+ minStruct struct { uint8 };
+)
const (
+ minStructAlign = unsafe.Sizeof(minStruct) - 1;
ptrsize = unsafe.Sizeof(&x);
interfacesize = unsafe.Sizeof(x.xinterface);
)
size += elemsize;
}
if (structalign > 0) {
+ // 6g etc. always aligns structs to a minimum size, typically int64
+ if structalign < minStructAlign {
+ structalign = minStructAlign
+ }
// TODO: In the PPC64 ELF ABI, floating point fields
// in a struct are aligned to a 4-byte boundary, but
// if the first field in the struct is a 64-bit float,