6_5_2_2_03_struct_param_2reg_mixed.c (372B)
1 /* 16-byte struct of four ints — 2-reg DIRECT path with sub-8B chunking. 2 * Field values are chosen so a+b+c+d == 42 but a+b+a+b == 34: if part 1 3 * is dropped or aliased to part 0 the sum collapses to 34. */ 4 struct S { 5 int a, b, c, d; 6 }; 7 int take(struct S s) { return s.a + s.b + s.c + s.d; } 8 int test_main(void) { 9 struct S s = {5, 12, 10, 15}; 10 return take(s); 11 }