/// Tests for correct stride calculation with aggregate array elements. /// This is important because aggregate types (records, arrays) are larger /// than a single word and require correct stride (not just 4 bytes). record Point: Copy { x: i32, y: i32 } /// Array of records (8 bytes per element). fn arrayOfRecords(arr: [Point; 3], idx: u32) -> i32 { return arr[idx].x; } /// Take address of record in array. fn addressOfRecord(arr: [Point; 3], idx: u32) -> *Point { return &arr[idx]; } /// Array of arrays (16 bytes per element). fn arrayOfArrays(arr: [[i32; 4]; 3], idx: u32) -> i32 { return arr[idx][0]; } /// Nested access with large stride. fn nestedLargeStride(arr: [[Point; 2]; 3], i: u32, j: u32) -> i32 { return arr[i][j].y; }