blob: 1d09d97ee689e28bf2e52a24c33d3a9a67051e4b [file] [log] [blame]
James Price94ac0782021-06-02 17:23:03 +00001#include <metal_stdlib>
2
3using namespace metal;
4struct tint_array_wrapper_0 {
5 int array[4];
6};
7struct S {
8 tint_array_wrapper_0 arr;
9};
10struct tint_array_wrapper_1 {
11 tint_array_wrapper_0 array[2];
12};
13
14void foo() {
15 tint_array_wrapper_0 const src = {};
16 tint_array_wrapper_0 dst = {0};
17 S dst_struct = {};
18 tint_array_wrapper_1 dst_array = {{0}};
19 thread tint_array_wrapper_0* const dst_ptr = &(dst);
20 thread S* const dst_struct_ptr = &(dst_struct);
21 thread tint_array_wrapper_1* const dst_array_ptr = &(dst_array);
22 dst_struct.arr = src;
23 dst_array.array[1] = src;
24 *(dst_ptr) = src;
25 (*(dst_struct_ptr)).arr = src;
26 (*(dst_array_ptr)).array[0] = src;
27}
28