1 // compile-flags: -Z print-type-sizes
4 // ^-- needed because `--pass check` does not emit the output needed.
5 // FIXME: consider using an attribute instead of side-effects.
7 // This file illustrates how packing is handled; it should cause
8 // the elimination of padding that would normally be introduced
9 // to satisfy alignment desirata.
11 // It avoids using u64/i64 because on some targets that is only 4-byte
12 // aligned (while on most it is 8-byte aligned) and so the resulting
13 // padding and overall computed sizes can be quite different.
63 fn start(_: isize, _: *const *const u8) -> isize {
64 let _c: Packed1 = Default::default();
65 let _d: Packed2 = Default::default();
66 let _e: Packed2C = Default::default();
67 let _f: Padded = Default::default();