1 #[repr(C)]
2 struct ABC {
3 pub a: f32,
4 pub b: u32,
5 pub c: u32,
6 }
7
8 #[repr(C)]
9 struct BAC {
10 pub b: u32,
11 pub a: f32,
12 pub c: i32,
13 }
14
15 impl ABC {
16 pub const abc: ABC = ABC { a: 1.0, b: 2, c: 3 };
17 pub const bac: ABC = ABC { b: 2, a: 1.0, c: 3 };
18 pub const cba: ABC = ABC { c: 3, b: 2, a: 1.0 };
19 }
20
21 impl BAC {
22 pub const abc: BAC = BAC { a: 2.0, b: 1, c: 3 };
23 pub const bac: BAC = BAC { b: 1, a: 2.0, c: 3 };
24 pub const cba: BAC = BAC { c: 3, b: 1, a: 2.0 };
25 }
26
27 #[no_mangle]
root(a1: ABC, a2: BAC)28 pub extern "C" fn root(a1: ABC, a2: BAC) {}
29