6_5_2_2_04_struct_param_large.c (407B)
1 /* 32-byte struct (>16B) — INDIRECT/byval on all three ABIs. The caller 2 * makes a copy in its frame and passes the address; the callee receives 3 * the pointer in the first int-arg register and treats its home slot as 4 * a pointer-to-copy. */ 5 struct S { 6 int a[8]; 7 }; 8 int take(struct S s) { return s.a[0] + s.a[7]; } 9 int test_main(void) { 10 struct S s = {{20, 0, 0, 0, 0, 0, 0, 22}}; 11 return take(s); 12 }